Skip to content

Commit 638b06c

Browse files
committed
Simplify the nginx setup with config files.
1 parent 519b49b commit 638b06c

File tree

7 files changed

+9
-130
lines changed

7 files changed

+9
-130
lines changed

docker/nginx/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ RUN apk add --update nginx && rm -rf /var/cache/apk/*
1010

1111
ADD ./nginx.conf /etc/nginx/nginx.conf
1212

13-
ADD ./application-7.1.conf \
14-
./application-debug-7.1.conf \
15-
./application-7.0.conf \
16-
./application-debug-7.0.conf \
17-
./application-5.6.conf \
18-
./application-debug-5.6.conf \
13+
ADD ./application-dev-7.1.conf \
14+
./application-dev-7.0.conf \
15+
./application-dev-5.6.conf \
1916
/etc/nginx/conf.d/
2017

2118
RUN /bin/sed -i "s@\${PROJECT_ROOT}@$NGINX_PROJECT_ROOT@" /etc/nginx/conf.d/application*.conf \
@@ -24,6 +21,6 @@ RUN /bin/sed -i "s@\${PROJECT_ROOT}@$NGINX_PROJECT_ROOT@" /etc/nginx/conf.d/appl
2421

2522
RUN mkdir -p /var/log/nginx
2623

27-
EXPOSE 8071 9071 8070 9070 8056 9056
24+
EXPOSE 8071 8070 8056
2825

2926
CMD ["nginx"]

docker/nginx/application-7.0.conf

Lines changed: 0 additions & 40 deletions
This file was deleted.

docker/nginx/application-7.1.conf

Lines changed: 0 additions & 39 deletions
This file was deleted.

docker/nginx/application-debug-5.6.conf

Lines changed: 0 additions & 39 deletions
This file was deleted.

docker/nginx/application-5.6.conf renamed to docker/nginx/application-dev-5.6.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location ~ ^/(${ALLOWED_FILES})\.php(/|$) {
12-
fastcgi_pass php-fpm-5.6:9001;
12+
fastcgi_pass php-fpm-5.6:9000;
1313
fastcgi_split_path_info ^(.+\.php)(/.*)$;
1414
include fastcgi_params;
1515
# When you are using symlinks to link the document root to the

docker/nginx/application-debug-7.0.conf renamed to docker/nginx/application-dev-7.0.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 9070;
2+
listen 8070;
33
#server_name symfony.dev;
44
root ${PROJECT_ROOT};
55

@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location ~ ^/(${ALLOWED_FILES})\.php(/|$) {
12-
fastcgi_pass php-fpm-debug-7.0:9002;
12+
fastcgi_pass php-fpm-7.0:9000;
1313
fastcgi_split_path_info ^(.+\.php)(/.*)$;
1414
include fastcgi_params;
1515
# When you are using symlinks to link the document root to the

docker/nginx/application-debug-7.1.conf renamed to docker/nginx/application-dev-7.1.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 9071;
2+
listen 8071;
33
#server_name symfony.dev;
44
root ${PROJECT_ROOT};
55

@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location ~ ^/(${ALLOWED_FILES})\.php(/|$) {
12-
fastcgi_pass php-fpm-debug-7.1:9002;
12+
fastcgi_pass php-fpm-7.1:9000;
1313
fastcgi_split_path_info ^(.+\.php)(/.*)$;
1414
include fastcgi_params;
1515
# When you are using symlinks to link the document root to the

0 commit comments

Comments
 (0)