update docker
This commit is contained in:
parent
89661aa4b9
commit
4a6e0e7d5d
12
freekake_api/.dockerignore
Normal file
12
freekake_api/.dockerignore
Normal file
@ -0,0 +1,12 @@
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.sqlite3
|
||||
env/
|
||||
venv/
|
||||
*.env
|
||||
*.log
|
||||
media/
|
||||
staticfiles/
|
||||
node_modules/
|
||||
@ -4,7 +4,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
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"
|
||||
volumes:
|
||||
- .:/app
|
||||
|
||||
@ -202,7 +202,7 @@ INTERNAL_IPS = [
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
DATA_UPLOAD_MAX_MEMORY_SIZE = 2 * 1024 * 1024 # 5MB
|
||||
DATA_UPLOAD_MAX_MEMORY_SIZE = 2 * 1024 * 1024
|
||||
|
||||
SIMPLE_JWT = {
|
||||
'AUTH_HEADER_TYPES': ('JWT',),
|
||||
|
||||
@ -14,11 +14,12 @@ server {
|
||||
location / {
|
||||
proxy_pass http://django_app;
|
||||
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-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
}
|
||||
|
||||
# OPTIONAL: serve static files if needed
|
||||
location /static/ {
|
||||
alias /static/;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user