-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose-sso.yaml
78 lines (73 loc) · 1.75 KB
/
docker-compose-sso.yaml
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
services:
inventory-api:
environment:
INVENTORY_API_CONFIG: /inventory-api-compose.yaml
build:
dockerfile: Dockerfile
volumes:
- ./sso-inventory-api.yaml:/inventory-api-compose.yaml:ro,z
- ./config/psks.yaml:/psks.yaml:ro,z
command: ["serve"]
restart: "always"
ports:
- "8081:8081"
- "9081:9081"
depends_on:
- keycloak
networks:
- kessel
invmigrate:
environment:
INVENTORY_API_CONFIG: /inventory-api-compose.yaml
build:
dockerfile: Dockerfile
volumes:
- ./sso-inventory-api.yaml:/inventory-api-compose.yaml:ro,z
command: ["migrate"]
restart: "on-failure"
depends_on:
- invdatabase
networks:
- kessel
invdatabase:
image: "postgres"
command: ["-p", "5433","-c", "track_commit_timestamp=on"]
hostname: invdatabase
expose:
- "5433"
ports:
- "5433:5433"
environment:
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=${POSTGRES_DBNAME}"
- "PGPORT=5433"
networks:
- kessel
keycloak:
image: "quay.io/keycloak/keycloak:latest"
command: "start-dev --http-port=8084 --db-url-port 5434 --import-realm"
restart: "on-failure"
environment:
- "KEYCLOAK_ADMIN=admin"
- "KEYCLOAK_ADMIN_PASSWORD=admin"
volumes:
- ./myrealm.json:/opt/keycloak/data/import/myrealm.json:rw,z
ports:
- 8084:8084
networks:
- kessel
database:
image: "postgres"
command: -c track_commit_timestamp=on
hostname: database
ports:
- "5434:5434"
environment:
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=${POSTGRES_DBNAME}"
networks:
- kessel
networks:
kessel:
name: kessel
external: true