-
Notifications
You must be signed in to change notification settings - Fork 28
/
dev-docker-compose.yml
103 lines (95 loc) · 2.14 KB
/
dev-docker-compose.yml
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
services:
nginx:
container_name: phase-nginx-dev
build:
context: .
dockerfile: ./nginx/Dockerfile
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- frontend
- backend
networks:
- phase-net-dev
frontend:
container_name: phase-frontend-dev
restart: unless-stopped
depends_on:
- backend
build:
context: ./frontend
dockerfile: Dockerfile.dev
volumes:
- ./frontend/:/app/
- /app/node_modules
env_file: .env.dev
networks:
- phase-net-dev
backend:
container_name: phase-backend-dev
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
build:
context: ./backend
dockerfile: Dockerfile.dev
volumes:
- ./backend/:/app/
env_file: .env.dev
networks:
- phase-net-dev
postgres:
container_name: phase-postgres
image: postgres:15.4-alpine3.17
restart: always
env_file:
- .env.dev
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_HOST_AUTH_METHOD: "trust"
volumes:
- phase-postgres-data-dev:/var/lib/postgresql/data
networks:
- phase-net-dev
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}"]
interval: 5s
timeout: 5s
retries: 5
redis:
container_name: phase-redis-dev
image: redis:alpine3.19
restart: always
ports:
- "6379:6379"
networks:
- phase-net-dev
rqworker:
container_name: phase-rqworker-dev
restart: unless-stopped
depends_on:
- backend
- redis
build:
context: ./backend
dockerfile: Dockerfile.dev
command: python manage.py rqworker default #overrides CMD in the dockerfile
volumes:
- ./backend/:/app/
env_file: .env.dev
networks:
- phase-net-dev
volumes:
phase-postgres-data-dev:
driver: local
networks:
phase-net-dev: