-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
47 lines (44 loc) · 1.3 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
47 lines (44 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: pixeltales-prod
services:
frontend:
container_name: pixeltales-frontend-prod
image: pixeltales-frontend-prod
build:
context: ./frontend
target: production-runtime
ports:
- '${FRONTEND_PORT:-80}:80'
environment:
- DOCKER_ENV=true
- VITE_BACKEND_URL=http://backend:${BACKEND_PORT:-8000}
depends_on:
- backend
networks:
- app-network
env_file: .env.production
backend:
container_name: pixeltales-backend-prod
image: pixeltales-backend-prod
build:
context: ./backend
target: production
working_dir: /workspace
ports:
- '${BACKEND_PORT:-8000}:8000'
volumes:
# Only persistent storage for SQLite database
- ./data/sqlite:/data/sqlite:rw
environment:
- ENV=production
- FRONTEND_PORT=${FRONTEND_PORT:-80}
- BACKEND_PORT=${BACKEND_PORT:-8000}
- BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS:-["http://localhost:${FRONTEND_PORT:-80}", "http://localhost", "http://127.0.0.1:${FRONTEND_PORT:-80}", "http://127.0.0.1"]}
- DB_TYPE=${DB_TYPE:-sqlite}
- SQLITE_URL=${SQLITE_URL:-sqlite+aiosqlite:////data/sqlite/pixeltales.db}
env_file: .env.production
networks:
- app-network
networks:
app-network:
name: pixeltales-network-prod
driver: bridge