File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,7 @@ FROM php:7.4-fpm-alpine AS app
2
2
3
3
# Define config vars
4
4
ENV APP_ENV=dev
5
-
6
- ENV SYS_NGINX_DIR=/etc/nginx \
7
- SYS_PHP_DIR=/etc/php/7.4/ \
8
- SUPERVISOR_CONFIG=docker-config/supervisord/supervisord.conf \
9
- NGINX_CONFIG=docker-config/nginx/nginx.conf \
10
- HOST_CONFIG=docker-config/nginx/conf.d/default.conf \
11
- PHP_CONFIG=docker-config/php/${APP_ENV}.ini \
12
- FPM_CONFIG=docker-config/php/fpm.conf
5
+ ENV SYS_NGINX_DIR=/etc/nginx
13
6
14
7
RUN apk update && apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
15
8
curl \
@@ -56,6 +49,7 @@ RUN apk update && apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
56
49
# Install composer
57
50
COPY --from=composer /usr/bin/composer /usr/bin/composer
58
51
52
+ # Copy source files to container
59
53
COPY . /var/www/html
60
54
WORKDIR /var/www/html
61
55
@@ -66,11 +60,13 @@ COPY docker-config/nginx/conf.d/default.conf ${SYS_NGINX_DIR}/conf.d/default.con
66
60
COPY docker-config/php/${APP_ENV}.ini /usr/local/etc/php/php.ini
67
61
COPY docker-config/php/fpm.conf /usr/local/etc/php-fpm.d/www.conf
68
62
69
- # Cleanup before start
63
+ # Create dirs before start
70
64
RUN mkdir /run/nginx && mkdir /run/supervisord
71
65
72
66
WORKDIR /var/www/html/app
73
67
68
+ # Use 80 port
74
69
EXPOSE 80
75
70
71
+ # Start supervisor
76
72
ENTRYPOINT ["/usr/bin/supervisord" , "--pidfile=/run/supervisord/supervisord.pid" ]
You can’t perform that action at this time.
0 commit comments