first commit
This commit is contained in:
27
docker-compose.yml
Normal file
27
docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# 一键启动:docker compose up --build
|
||||
# 前端 http://localhost:8080 后端管理 http://localhost:8000/admin/
|
||||
services:
|
||||
backend:
|
||||
build: ./backend
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- backend_data:/data
|
||||
environment:
|
||||
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:-dev-secret-change-me}
|
||||
DJANGO_DEBUG: "false"
|
||||
DJANGO_ALLOWED_HOSTS: localhost,127.0.0.1,backend
|
||||
CORS_ALLOWED_ORIGINS: http://localhost:8080,http://127.0.0.1:8080
|
||||
CSRF_TRUSTED_ORIGINS: http://localhost:8080,http://127.0.0.1:8080
|
||||
SQLITE_PATH: /data/db.sqlite3
|
||||
MEDIA_ROOT: /data/media
|
||||
|
||||
frontend:
|
||||
build: ./frontend
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
backend_data:
|
||||
Reference in New Issue
Block a user