nginx
This commit is contained in:
@@ -26,13 +26,11 @@ server {
|
|||||||
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://personal-api/;
|
proxy_pass http://personal-api:8000/;
|
||||||
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_connect_timeout 300s;
|
proxy_connect_timeout 300s;
|
||||||
proxy_read_timeout 300s;
|
proxy_read_timeout 300s;
|
||||||
|
|
||||||
}
|
}
|
||||||
listen 8000;
|
|
||||||
server_name localhost;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
ports:
|
ports:
|
||||||
- "80:8000"
|
- "80:80"
|
||||||
networks:
|
networks:
|
||||||
- my-network
|
- my-network
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/nginx:/etc/nginx/conf.d
|
- ./data/nginx/app.conf:/etc/nginx/conf.d/default.conf
|
||||||
- ./data/certbot/conf:/etc/letsencrypt
|
- ./data/certbot/conf:/etc/letsencrypt
|
||||||
- ./data/certbot/www:/var/www/certbot
|
- ./data/certbot/www:/var/www/certbot
|
||||||
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
|
||||||
@@ -29,9 +29,7 @@ services:
|
|||||||
- ./.env.prod
|
- ./.env.prod
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/personal_api/
|
- ./:/personal_api/
|
||||||
command: gunicorn -w 4 -k uvicorn.workers.UvicornWorker personal_api.main:app -b 0.0.0.0:8000
|
command: gunicorn -w 4 -k uvicorn.workers.UvicornWorker personal_api.main:app -b 0.0.0.0
|
||||||
expose:
|
|
||||||
- "8000"
|
|
||||||
networks:
|
networks:
|
||||||
my-network:
|
my-network:
|
||||||
aliases:
|
aliases:
|
||||||
|
|||||||
Reference in New Issue
Block a user