-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
207 lines (192 loc) · 4.66 KB
/
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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
version: '3'
services:
app:
profiles: ['devcontainer']
container_name: codedang-dev
build:
context: .
dockerfile: .devcontainer/Dockerfile
volumes:
- .:/workspace:cached
depends_on:
- rabbitmq
- database
stdin_open: true
tty: true
env_file: .env.development
environment:
DEVCONTAINER: 1
network_mode: host
local-storage:
profiles: ['devcontainer']
container_name: codedang-local-storage
image: minio/minio
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- codedang-storage:/data
deploy-storage:
profiles: ['deploy']
container_name: codedang-deploy-storage
image: minio/minio
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ":9001"
env_file: .env
environment:
MINIO_BROWSER_REDIRECT_URL: https://stage.codedang.com/console
volumes:
- codedang-storage:/data
database:
container_name: codedang-database
image: postgres:16-alpine
ports:
- 5433:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
POSTGRES_DB: skkuding
volumes:
- codedang-database:/var/lib/postgresql/data
test-database:
container_name: codedang-test-database
image: postgres:16-alpine
ports:
- 5434:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
POSTGRES_DB: skkuding
volumes:
- codedang-test-database:/var/lib/postgresql/data
cache:
container_name: codedang-cache
image: redis:7-alpine
ports:
- 6380:6379
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: codedang-rabbitmq
ports:
- 15672:15672 # Admin Management
- 5672:5672
env_file: .env.development
environment:
RABBITMQ_ERLANG_COOKIE: RabbitMQ-My-Cookies
volumes:
- codedang-rabbitmq:/var/lib/rabbitmq
caddy:
profiles: ['deploy']
image: caddy:2.8.4-alpine
container_name: caddy
restart: always
ports:
- '80:80'
- '443:443'
network_mode: host
backend-client:
profiles: ['deploy', 'update-target']
image: ghcr.io/skkuding/codedang-client-api:latest
container_name: backend-client
restart: always
depends_on:
setup:
condition: service_completed_successfully
env_file:
- .env.development
- .env
network_mode: host
deploy:
resources:
reservations:
cpus: '0.58'
memory: 512M
limits:
cpus: '2.0'
memory: 2G
backend-admin:
profiles: ['deploy', 'update-target']
image: ghcr.io/skkuding/codedang-admin-api:latest
container_name: backend-admin
restart: always
depends_on:
setup:
condition: service_completed_successfully
env_file:
- .env.development
- .env
network_mode: host
deploy:
resources:
reservations:
cpus: '0.58'
memory: 512M
limits:
cpus: '2.0'
memory: 2G
iris:
profiles: ['deploy', 'update-target']
image: ghcr.io/skkuding/codedang-iris:latest
container_name: iris
restart: always
depends_on:
setup:
condition: service_completed_successfully
env_file: .env.development
network_mode: host
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
promtail:
profiles: ['deploy']
image: grafana/promtail
container_name: grafana-promtail
restart: always
env_file: .env
depends_on:
- backend-client
- backend-admin
- iris
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $PWD/apps/grafana-logs/promtail/promtail-config.yml:/etc/promtail/promtail-config.yml
command:
- -config.file=/etc/promtail/promtail-config.yml
- -config.expand-env=true
network_mode: host
dozzle:
profiles: ['deploy']
image: amir20/dozzle:latest
container_name: dozzle
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 9999:8080
environment:
DOZZLE_BASE: /logs
setup:
profiles: ['deploy']
image: python:3-bullseye # Python for rabbitmqadmin
container_name: setup
depends_on:
- rabbitmq
- database
- deploy-storage
volumes:
- $PWD/scripts:/etc/scripts
# - $PWD/dist:/etc/dist:z
network_mode: host
command: ['/bin/bash', '/etc/scripts/deploy.sh']
volumes:
codedang-storage:
codedang-database:
codedang-test-database:
codedang-rabbitmq: