-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.dev.yml
167 lines (155 loc) · 3.37 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
155
156
157
158
159
160
161
162
163
164
165
166
167
services:
backend:
build:
context: .
dockerfile: ./backend/Dockerfile
depends_on:
- postgres
- sub-chart
- sub-audio
- sub-image
volumes:
- ./.env:/app/.env
profiles:
- prod
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 5
frontend:
build:
context: .
dockerfile: ./frontend/Dockerfile
volumes:
- ./.env:/app/.env
profiles:
- prod
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3100"]
interval: 30s
timeout: 10s
retries: 5
sub-chart:
build:
context: .
dockerfile: ./sub-chart/Dockerfile
volumes:
- ./.env:/app/.env
profiles:
- prod
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3201"]
interval: 30s
timeout: 10s
retries: 5
sub-audio:
build:
context: .
dockerfile: ./sub-audio/Dockerfile
volumes:
- ./.env:/app/.env
profiles:
- prod
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3202"]
interval: 30s
timeout: 10s
retries: 5
sub-image:
build:
context: .
dockerfile: ./sub-image/Dockerfile
volumes:
- ./.env:/app/.env
profiles:
- prod
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3203"]
interval: 30s
timeout: 10s
retries: 5
nginx:
image: nginx:latest
ports:
- "$FINAL_PORT:80"
depends_on:
- backend
- frontend
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./backend/public:/app/backend-public
- ./backend/assets:/app/backend-assets
profiles:
- prod
postgres:
image: postgres:15
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DATABASE}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
profiles:
- prod
- dev
- test
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- "./data/redis:/data"
profiles:
- prod
- dev
- test
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
command: ["server", "/data", "--console-address", ":9001"]
ports:
- "9000:9000"
- "9001:9001"
volumes:
- "./data/minio:/data"
environment:
MINIO_ROOT_USER: "${S3_USER}"
MINIO_ROOT_PASSWORD: "${S3_PASSWORD}"
profiles:
- dev
- test
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
mc:
image: minio/mc:latest
depends_on:
- minio
entrypoint: sh
command: |
-c '
mc config host add minio http://minio:9000 ${S3_USER} ${S3_PASSWORD} &&
mc mb minio/${S3_BUCKET} &&
mc policy set public minio/${S3_BUCKET}
'
profiles:
- "init"
- test
environment:
S3_USER: "${S3_USER}"
S3_PASSWORD: "${S3_PASSWORD}"
S3_BUCKET: "${S3_BUCKET}"