-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (21 loc) · 1.03 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
30
FROM richarvey/nginx-php-fpm:1.7.0
RUN apk update && apk add libzip-dev zip mysql-client && rm -rf /var/cache/apk/*
RUN docker-php-ext-install opcache mysqli pdo_mysql zip
RUN apk add --no-cache \
$PHPIZE_DEPS \
openssl-dev
RUN pecl install redis && docker-php-ext-enable redis
ADD docker/php-fpm/docker.conf /usr/local/etc/php-fpm.d/docker.conf
ADD docker/php-fpm/www.conf /usr/local/etc/php-fpm.d/www.conf
ADD docker/php-fpm/php.ini /usr/local/etc/php/php.ini
ADD docker/php-fpm/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
ADD docker/nginx/nginx.conf /etc/nginx/nginx.conf
ADD docker/nginx/app.conf /etc/nginx/conf.d/default.conf
RUN echo "* * * * * php /var/www/html/artisan schedule:run" | crontab -
RUN mkdir -p /etc/supervisor/conf.d/
ADD docker/supervisor/crond.conf /etc/supervisor/conf.d/
ADD ./src /var/www/html
RUN cp /var/www/html/.env.docker /var/www/html/.env
RUN cd /var/www/html && composer install --no-interaction && vendor/bin/phpunit
RUN chown -R nginx:nginx /var/www/html
RUN chmod -R 777 /var/www/html/storage/