perbaikan

This commit is contained in:
Irwan Cahyono 2025-06-30 12:31:43 +07:00
parent 8352a471a2
commit 228e1bcd72
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
services: services:
web: webapp:
build: build:
context: . context: .
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
@ -21,6 +21,7 @@ services:
volumes: volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf - ./nginx.conf:/etc/nginx/conf.d/default.conf
- static_volume:/static - static_volume:/static
- ./media:/media
depends_on: depends_on:
- web - web
networks: networks:

View File

@ -1,8 +1,8 @@
# nginx.conf # nginx.conf
client_max_body_size 8M; client_max_body_size 10M;
upstream django_app { upstream django_app {
server web:8000; server webapp:8000;
} }
server { server {
@ -10,10 +10,9 @@ server {
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
client_max_body_size 50M;
location / { location / {
proxy_pass http://web:8000; proxy_pass http://django_app;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off; proxy_redirect off;