chore : nginx
This commit is contained in:
+3
-10
@@ -2,25 +2,18 @@ services:
|
|||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8606:80"
|
||||||
expose:
|
expose:
|
||||||
- "3000"
|
- "3000"
|
||||||
env_file:
|
env_file:
|
||||||
.env
|
.env
|
||||||
networks:
|
|
||||||
- erika
|
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
ports:
|
|
||||||
- "8606:80"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
|
network_mode: "service:app"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
|
||||||
- erika
|
|
||||||
|
|
||||||
networks:
|
|
||||||
erika:
|
|
||||||
driver: bridge
|
|
||||||
|
|||||||
+1
-3
@@ -31,11 +31,9 @@ http {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
resolver 127.0.0.11 valid=5s ipv6=off;
|
|
||||||
set $backend http://app:3000;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass $backend;
|
proxy_pass http://127.0.0.1:3000;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|||||||
Reference in New Issue
Block a user