forked from SAIL-UA/CAST-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
116 lines (109 loc) · 2.88 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
116 lines (109 loc) · 2.88 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
services:
db:
image: postgres:17
container_name: cast-db-dev
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data
# ports:
# - "5432:5432" # Only expose if needed for external DB tools
networks:
- cast-network
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
redis:
image: redis:7-alpine
container_name: cast-redis-dev
ports:
- "6379:6379" # Expose for local development
restart: unless-stopped
networks:
- cast-network
backend:
build:
context: ./backend
dockerfile: Dockerfile.arm # Change to Dockerfile for non-ARM devices
container_name: cast-backend-dev
restart: unless-stopped
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
env_file:
- .env
# ports:
# - "8076:8076" # Now accessed via nginx proxy
volumes:
- ./data:/data/CAST_ext # Use local data directory
- static:/app/staticfiles
networks:
- cast-network
command: >
sh -c "python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py makemigrations &&
python manage.py migrate &&
gunicorn config.wsgi:application --bind 0.0.0.0:8051 --workers 3"
celery:
build:
context: ./backend
dockerfile: Dockerfile.arm # Change to Dockerfile for non-ARM devices
container_name: cast-celery-dev
restart: unless-stopped
volumes:
- ./data:/data/CAST_ext # Use local data directory
env_file:
- .env
networks:
- cast-network
depends_on:
- db
- redis
command: celery -A config worker --loglevel=info
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=http://localhost
container_name: cast-frontend-dev
restart: unless-stopped
environment:
- NODE_ENV=development
volumes:
- frontend_build:/shared-build # Share build with nginx
depends_on:
- backend
networks:
- cast-network
nginx:
image: nginx:alpine
container_name: cast-nginx-dev
ports:
- "80:80"
volumes:
- ./nginx/project.dev.conf:/etc/nginx/conf.d/default.conf
- frontend_build:/var/www/html
- static:/staticfiles:ro
depends_on:
- backend
- frontend
networks:
- cast-network
restart: unless-stopped
networks:
cast-network:
driver: bridge
volumes:
db_data:
static:
frontend_build: