-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
113 lines (106 loc) · 3.43 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
---
services:
traefik:
image: ${TCS_IMAGE_TRAEFIK}
restart: always
command:
- "--api.insecure=true"
- "--providers.file=true"
- "--providers.file.directory=/etc/traefik/dynamic"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:80"
- "--entrypoints.https.address=:443"
ports:
- ${TCS_LISTEN_ADDRESS}:443:443
- ${TCS_LISTEN_ADDRESS_INTERNAL_SERVICES}:8080:8080
volumes:
- "./files/traefik/certificates:/etc/traefik/certificates:ro"
- "./files/traefik/certificates.yml:/etc/traefik/dynamic/certificates.yml:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
mariadb:
image: ${TCS_IMAGE_MARIADB}
restart: always
environment:
MARIADB_ROOT_PASSWORD: ${TCS_DATABASE_ROOT_PASSWORD}
MARIADB_DATABASE: tcs
MARIADB_USER: tcs
MARIADB_PASSWORD: ${TCS_DATABASE_PASSWORD}
ports:
- ${TCS_LISTEN_ADDRESS_SERVICES}:3306:3306
volumes:
- mariadb:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
minio:
image: ${TCS_IMAGE_MINIO}
restart: always
command: server /data --address ":9000" --console-address ":9001"
ports:
- ${TCS_LISTEN_ADDRESS_INTERNAL_SERVICES}:9001:9001
environment:
MINIO_SERVER_URL: https://${TCS_DOMAIN_MINIO}
volumes:
- minio-1:/data1
- minio-2:/data2
labels:
- "traefik.enable=true"
- "traefik.http.services.minio.loadbalancer.server.port=9000"
- "traefik.http.services.minio.loadbalancer.passhostheader=true"
- "traefik.http.routers.minio-secure.rule=Host(`${TCS_DOMAIN_MINIO}`)"
- "traefik.http.routers.minio-secure.entrypoints=https"
- "traefik.http.routers.minio-secure.tls=true"
redis:
image: ${TCS_IMAGE_REDIS}
restart: always
ports:
- ${TCS_LISTEN_ADDRESS_SERVICES}:6379:6379
keycloak:
image: ${TCS_IMAGE_KEYCLOAK}
restart: always
command: start-dev --proxy edge --import-realm --http-port 80
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: ${TCS_KEYCLOAK_ADMIN_PASSWORD}
volumes:
- ./files/keycloak:/opt/keycloak/data/import:ro
labels:
- "traefik.enable=true"
- "traefik.http.services.keycloak.loadbalancer.server.port=80"
- "traefik.http.routers.keycloak-secure.rule=Host(`${TCS_DOMAIN_KEYCLOAK}`)"
- "traefik.http.routers.keycloak-secure.entrypoints=https"
- "traefik.http.routers.keycloak-secure.tls=true"
beat:
image: ${TCS_IMAGE}
restart: always
command: "python3 -m tcsapi.cmd.beat"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- redis
api:
image: ${TCS_IMAGE}
restart: always
command: "python3 -m tcsapi.cmd.api"
depends_on:
redis:
condition: service_started
beat:
condition: service_started
keycloak:
condition: service_started
mariadb:
condition: service_healthy
worker:
condition: service_started
labels:
- "traefik.enable=true"
- "traefik.http.services.api.loadbalancer.server.port=8080"
- "traefik.http.services.api.loadbalancer.passhostheader=true"
- "traefik.http.routers.api-secure.rule=Host(`${TCS_DOMAIN_API}`)"
- "traefik.http.routers.api-secure.entrypoints=https"
- "traefik.http.routers.api-secure.tls=true"
volumes:
mariadb:
minio-1:
minio-2: