-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (23 loc) · 1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM php:7.2-apache
# install MongoDB PHP extension
RUN pecl install mongodb && echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongo.ini
# install zip, composer
RUN apt-get update && \
apt-get install -y zip && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Apache setup
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf && \
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
a2enmod rewrite
# add source code and dependencies
COPY . /var/www/html
WORKDIR /var/www/html
RUN composer install
# Laravel setup
RUN chmod -R 777 /var/www/html/storage && \
cp .env.example .env && \
php artisan key:generate
# download mapping file
#ADD https://raw.githubusercontent.com/sfu-ireceptor/config/turnkey/AIRR-iReceptorMapping.txt /var/www/html/
#RUN chmod 755 /var/www/html/AIRR-iReceptorMapping.txt