-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.rezal.yml
184 lines (166 loc) · 4.65 KB
/
docker-compose.rezal.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
version: "3.8"
services:
db:
image: postgres:12.2
hostname: db
volumes:
- pg:/data/postgres
networks:
net:
deploy:
endpoint_mode: dnsrr
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /data/postgres
rest:
image: registry.efreicraft.fr/animus:stable
restart: always
tty: true
deploy:
endpoint_mode: dnsrr
replicas: 2
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.routers.animus.rule=Host(`api.efreicraft.fr`)"
- "traefik.http.routers.animus.entrypoints=websecure"
- "traefik.http.services.animus.loadbalancer.server.port=3000"
- "traefik.http.services.animus.loadbalancer.sticky=true"
- "traefik.http.services.animus.loadbalancer.sticky.cookie.name=server_id"
- "traefik.http.services.animus.loadbalancer.sticky.cookie.httpOnly=true"
depends_on:
- db
- redis
environment:
NODE_ENV: ${NODE_ENV}
API_HOST: ${API_HOST}
SWAGGER_URL: ${SWAGGER_URL}
INFRASTRUCTURE_NAME: ${INFRASTRUCTURE_NAME}
SERVER_TYPE: rest
DATABASE_URL: ${DATABASE_URL}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
OAUTH2_CLIENT_ID: ${OAUTH2_CLIENT_ID}
OAUTH2_CLIENT_SECRET: ${OAUTH2_CLIENT_SECRET}
OAUTH2_REDIRECT_URI: ${OAUTH2_REDIRECT_URI}
networks:
traefik_public:
net:
worker:
image: registry.efreicraft.fr/animus:stable
restart: always
tty: true
deploy:
endpoint_mode: dnsrr
replicas: 1
restart_policy:
condition: on-failure
depends_on:
- db
- redis
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
NODE_ENV: ${NODE_ENV}
API_HOST: ${API_HOST}
API_TOKEN: ${API_TOKEN}
SERVER_TYPE: worker
INFRASTRUCTURE_NAME: ${INFRASTRUCTURE_NAME}
STORAGE_PATH: ${STORAGE_PATH}
DATABASE_URL: ${DATABASE_URL}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_DB: ${REDIS_DB}
DOCKER_REGISTRY: ${DOCKER_REGISTRY}
DOCKER_USERNAME: ${DOCKER_USERNAME}
DOCKER_PASSWORD: ${DOCKER_PASSWORD}
DISCORD_TOKEN: ${DISCORD_TOKEN}
networks:
net:
redis:
image: bitnami/redis:latest
restart: always
deploy:
endpoint_mode: dnsrr
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
networks:
net:
studio:
image: jiveoff/prisma-studio:latest
restart: always
networks:
net:
traefik_public:
depends_on:
- db
environment:
POSTGRES_URL: ${DATABASE_URL}
deploy:
endpoint_mode: dnsrr
labels:
- "traefik.enable=true"
- "traefik.http.routers.studio.rule=Host(`studio.efreicraft.fr`)"
- "traefik.http.routers.studio.middlewares=authentik@docker"
- "traefik.http.routers.studio.entrypoints=websecure"
- "traefik.http.services.studio.loadbalancer.server.port=5555"
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
restart: always
environment:
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
networks:
net:
traefik_public:
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.commander.rule=Host(`redis.efreicraft.fr`)"
- "traefik.http.routers.commander.middlewares=authentik@docker"
- "traefik.http.routers.commander.entrypoints=websecure"
- "traefik.http.services.commander.loadbalancer.server.port=8081"
tower:
image: ghcr.io/efrei-craft/controltower:stable
restart: always
tty: true
networks:
net:
traefik_public:
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.tower.rule=Host(`tower.efreicraft.fr`)"
- "traefik.http.routers.tower.entrypoints=websecure"
- "traefik.http.services.tower.loadbalancer.server.port=3000"
volumes:
pg:
driver: local
networks:
net:
name: ${INFRASTRUCTURE_NAME}
attachable: true
driver_opts:
com.docker.network.driver.mtu: 1280
traefik_public:
external: true