Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
168 lines (156 loc) · 3.7 KB
/
Copy pathcompose.yml
File metadata and controls
168 lines (156 loc) · 3.7 KB
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
name: auth
services:
token:
build:
context: .
dockerfile: services/token/Dockerfile
env_file: .env
container_name: auth-token
restart: unless-stopped
networks:
server:
volumes:
- ./certs:/certs:ro
generator:
build:
context: .
dockerfile: services/generator/Dockerfile
env_file: .env
container_name: auth-generator
restart: unless-stopped
depends_on:
server-db:
condition: service_healthy
networks:
server:
volumes:
- data:/app/data
- ./certs:/certs:ro
distributor:
build:
context: .
dockerfile: services/distributor/Dockerfile
env_file: .env
container_name: auth-distributor
restart: unless-stopped
ports:
- ${DISTRIBUTOR_PORT}:${DISTRIBUTOR_PORT}
networks:
server:
volumes:
- data:/app/data
preauth:
build:
context: .
dockerfile: services/preauth/Dockerfile
env_file: .env
container_name: auth-preauth
restart: unless-stopped
ports:
- ${PREAUTH_ADD_PORT}:${PREAUTH_ADD_PORT}
- ${PREAUTH_GET_PORT}:${PREAUTH_GET_PORT}
networks:
server:
volumes:
- ./certs:/certs:ro
verifier:
build:
context: .
dockerfile: services/verifier/Dockerfile
env_file: .env
container_name: auth-verifier
restart: unless-stopped
depends_on:
client-db:
condition: service_healthy
networks:
client:
server:
server-db:
image: mariadb
container_name: auth-server-db
restart: unless-stopped
healthcheck:
test: "/usr/bin/mariadb --user=${SERVER_DB_USER} --password=${SERVER_DB_PASSWORD} --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 10s
retries: 5
environment:
MYSQL_DATABASE: ${SERVER_DB_NAME}
MYSQL_USER: ${SERVER_DB_USER}
MYSQL_PASSWORD: ${SERVER_DB_PASSWORD}
volumes:
- db:/var/lib/mysql
networks:
server:
client-db:
image: mariadb
container_name: auth-client-db
restart: unless-stopped
healthcheck:
test: "/usr/bin/mariadb --user=${CLIENT_DB_USER} --password=${CLIENT_DB_PASSWORD} --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 10s
retries: 5
environment:
MYSQL_DATABASE: ${CLIENT_DB_NAME}
MYSQL_USER: ${CLIENT_DB_USER}
MYSQL_PASSWORD: ${CLIENT_DB_PASSWORD}
volumes:
- db-client:/var/lib/mysql
networks:
client:
client-db-nosql:
image: mongo
container_name: auth-client-db-nosql
restart: unless-stopped
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 2s
timeout: 10s
retries: 5
environment:
MONGO_INITDB_DATABASE: ${CLIENT_DB_NOSQL_NAME}
MONGO_INITDB_ROOT_USERNAME: ${CLIENT_DB_NOSQL_USER}
MONGO_INITDB_ROOT_PASSWORD: ${CLIENT_DB_NOSQL_PASSWORD}
volumes:
- db-client-nosql:/data/db
networks:
client:
client-db-postgres:
image: postgres
container_name: auth-client-db-postgres
restart: unless-stopped
healthcheck:
test: ["CMD", "pg_isready", "-U", "${CLIENT_PGSQL_USER}"]
interval: 2s
timeout: 10s
retries: 5
environment:
POSTGRES_DB: ${CLIENT_PGSQL_NAME}
POSTGRES_USER: ${CLIENT_PGSQL_USER}
POSTGRES_PASSWORD: ${CLIENT_PGSQL_PASSWORD}
volumes:
- db-client-postgres:/var/lib/postgresql
networks:
client:
redis:
image: redis
container_name: auth-redis
restart: unless-stopped
volumes:
- redis:/data
networks:
server:
volumes:
db:
db-client:
db-client-nosql:
db-client-postgres:
redis:
data:
networks:
server:
driver: bridge
client:
driver: bridge