update docker

This commit is contained in:
Irwan Cahyono 2025-08-07 09:37:46 +07:00
parent 89661aa4b9
commit 4a6e0e7d5d
4 changed files with 16 additions and 3 deletions

View File

@ -0,0 +1,12 @@
__pycache__/
*.pyc
*.pyo
*.pyd
*.sqlite3
env/
venv/
*.env
*.log
media/
staticfiles/
node_modules/

View File

@ -4,7 +4,7 @@ services:
build: build:
context: . context: .
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
# command: gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000 command: gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000
# command: sh -c "gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000" # command: sh -c "gunicorn freekake_api.wsgi:application --bind 0.0.0.0:8000"
volumes: volumes:
- .:/app - .:/app

View File

@ -202,7 +202,7 @@ INTERNAL_IPS = [
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
DATA_UPLOAD_MAX_MEMORY_SIZE = 2 * 1024 * 1024 # 5MB DATA_UPLOAD_MAX_MEMORY_SIZE = 2 * 1024 * 1024
SIMPLE_JWT = { SIMPLE_JWT = {
'AUTH_HEADER_TYPES': ('JWT',), 'AUTH_HEADER_TYPES': ('JWT',),

View File

@ -14,11 +14,12 @@ server {
location / { location / {
proxy_pass http://django_app; proxy_pass http://django_app;
proxy_set_header Host $host; proxy_set_header Host $host;
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;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off; proxy_redirect off;
} }
# OPTIONAL: serve static files if needed
location /static/ { location /static/ {
alias /static/; alias /static/;
} }