RM Nginx
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
@@ -34,14 +32,14 @@ services:
|
|||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
build: .
|
||||||
expose:
|
ports:
|
||||||
- "8000"
|
- "8001:8000" # Expose on host port 8001
|
||||||
volumes:
|
volumes:
|
||||||
- static_volume:/app/staticfiles
|
- static_volume:/app/staticfiles
|
||||||
- media_volume:/app/media
|
- media_volume:/app/media
|
||||||
environment:
|
environment:
|
||||||
- SECRET_KEY=${SECRET_KEY}
|
- SECRET_KEY=${SECRET_KEY:-dev-secret-key-change-me}
|
||||||
- DEBUG=${DEBUG:-False}
|
- DEBUG=${DEBUG:-True}
|
||||||
- ALLOWED_HOSTS=${ALLOWED_HOSTS:-localhost,127.0.0.1}
|
- ALLOWED_HOSTS=${ALLOWED_HOSTS:-localhost,127.0.0.1}
|
||||||
- DATABASE_URL=postgres://splitchat:${DB_PASSWORD:-splitchat_password_123}@db:5432/splitchat
|
- DATABASE_URL=postgres://splitchat:${DB_PASSWORD:-splitchat_password_123}@db:5432/splitchat
|
||||||
- REDIS_URL=redis://redis:6379/0
|
- REDIS_URL=redis://redis:6379/0
|
||||||
@@ -54,21 +52,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- splitchat_network
|
- splitchat_network
|
||||||
|
|
||||||
# Optional: Nginx for serving static files (if you want to offload from Django)
|
|
||||||
nginx:
|
|
||||||
image: nginx:alpine
|
|
||||||
ports:
|
|
||||||
- "8002:80"
|
|
||||||
volumes:
|
|
||||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
||||||
- static_volume:/static:ro
|
|
||||||
- media_volume:/media:ro
|
|
||||||
depends_on:
|
|
||||||
- web
|
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
|
||||||
- splitchat_network
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
redis_data:
|
redis_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user