-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
154 lines (145 loc) · 3.34 KB
/
docker-compose.dev.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
services:
postgres:
container_name: interapp-postgres
image: postgres:16-alpine
restart: on-failure
ports:
- 5432:5432
command: postgres
env_file:
- ./interapp-backend/.env.development
volumes:
- ./interapp-backend/pgdata:/var/lib/postgresql/data
networks:
- interapp-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 2s
retries: 5
start_period: 60s
deploy:
resources:
reservations:
cpus: '0.5'
memory: 2G
redis:
container_name: interapp-redis
image: redis:alpine
restart: on-failure
env_file:
- ./interapp-backend/.env.development
ports:
- 6379:6379
networks:
- interapp-network
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 2s
timeout: 2s
retries: 7
scheduler:
container_name: interapp-scheduler
restart: on-failure
build:
context: ./interapp-backend
dockerfile: scheduler/dev.Dockerfile
develop:
watch:
- path: ./interapp-backend/scheduler
action: sync
target: /app/scheduler
env_file:
- ./interapp-backend/.env.development
networks:
- interapp-network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- type: bind
source: ./dump
target: /tmp/dump
- type: bind
source: ./minio-dump
target: /tmp/minio-dump
minio:
container_name: interapp-minio
image: minio/minio
restart: on-failure
command: minio server /data
env_file:
- ./interapp-backend/.env.development
- ./interapp-backend/.env.local
ports:
- 9000:9000
- 9001:9001
volumes:
- ./interapp-backend/minio_data:/data
networks:
- interapp-network
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 2s
timeout: 2s
retries: 5
start_period: 60s
depends_on:
postgres:
condition: service_healthy
backend:
container_name: interapp-backend
restart: on-failure
build:
context: ./interapp-backend
dockerfile: dev.Dockerfile
develop:
watch:
- path: ./interapp-backend/api
action: sync
target: /app/api
- path: ./interapp-backend/db
action: sync
target: /app/db
env_file:
- ./interapp-backend/.env.development
environment:
- APP_VERSION=${APP_VERSION}
ports:
- 8000:8000
networks:
- interapp-network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
frontend:
container_name: interapp-frontend
build:
context: ./interapp-frontend
dockerfile: dev.Dockerfile
volumes:
- ./interapp-frontend/src:/app/src
env_file:
- ./interapp-frontend/.env.development
environment:
- NEXT_PUBLIC_APP_VERSION=${APP_VERSION}
ports:
- 3000:3000
networks:
- interapp-network
depends_on:
- backend
deploy:
resources:
reservations:
cpus: '0.5'
memory: 3G
networks:
interapp-network:
driver: bridge