-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (46 loc) · 1.17 KB
/
docker-compose.yml
File metadata and controls
46 lines (46 loc) · 1.17 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
services:
web:
build:
context: .
args:
INSTALL_DEV: "true"
command: >
bash -c "set -e &&
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py invalidate_cachalot tcf_website &&
echo 'Starting Django Server...' &&
exec python manage.py runserver 0.0.0.0:8000"
environment:
- DJANGO_SETTINGS_MODULE=tcf_core.settings.dev
volumes:
- .:/app
- /app/db/ # exclude the subfolder to prevent potential interference
- node_modules:/app/node_modules
ports:
- "8000:8000"
container_name: tcf_django
restart: always
depends_on:
- db
# db:
# condition: service_healthy
db:
image: postgres:17.5
volumes:
- ./db:/app
restart: always
container_name: tcf_db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
POSTGRES_PORT: ${DB_PORT}
# healthcheck:
# test: ["CMD-SHELL", 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"']
# interval: 1s
# timeout: 2s
# retries: 20
# start_period: 2s
volumes:
node_modules: