-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.2 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
services:
auth:
build:
context: .
dockerfile: Dockerfile
container_name: auth
restart: unless-stopped
ports:
- "5000:5000" # REST HTTPS
- "5001:5001" # gRPC HTTPS
depends_on:
authdev-db:
condition: service_healthy
volumes:
- ./certs:/root/certs
env_file:
- .env
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__DefaultConnection=Host=authdev-db;Port=5432;Database=AuthDev;Username=postgres;Password=postgres
healthcheck:
test: ["CMD", "curl", "-k", "-f", "https://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- db_net
authdev-db:
image: postgres:15
container_name: authdev-db
environment:
POSTGRES_DB: AuthDev
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5434:5432"
volumes:
- AuthDev-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d AuthDev"]
interval: 5s
timeout: 5s
retries: 10
networks:
- db_net
keycloak-db:
image: postgres:15
container_name: keycloak-db
profiles: ["keycloak"]
environment:
POSTGRES_DB: Auth
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- Auth-data:/var/lib/postgresql/data
networks:
- db_net
keycloak:
build:
context: Deploy/Keycloak
dockerfile: Dockerfile
container_name: keycloak
profiles: ["keycloak"]
command: >
start
--http-enabled=true
--hostname-strict=false
--import-realm
environment:
KC_FEATURES: scripts
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://keycloak-db:5432/Auth
KC_DB_USERNAME: postgres
KC_DB_PASSWORD: postgres
volumes:
- ./Deploy/Keycloak/realms/realm-authz.json:/opt/keycloak/data/import/realm-authz.json:ro
ports:
- "8081:8080"
depends_on:
- keycloak-db
networks:
- db_net
volumes:
Auth-data:
AuthDev-data:
networks:
db_net:
driver: bridge