-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (63 loc) · 1.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (63 loc) · 1.57 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
# Use postgres/example user/password credentials
version: '3.1'
services:
# web:
# build: src/Library.Api/
# networks:
# - keycloak-network
# ports:
# - 5000:80
# restart: on-failure
# environment:
# - ASPNETCORE_ENVIRONMENT=Development
# depends_on:
# - library_db
# - auth
auth:
image: keycloak/keycloak
networks:
- keycloak-network
ports:
- 8080:8080
volumes:
- ./imports:/opt/jboss/keycloak/imports
environment:
KEYCLOAK_IMPORT: /opt/jboss/keycloak/imports/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: secret
KEYCLOAK_FRONTEND_URL: http://localhost:8080/auth
DB_VENDOR: POSTGRES
DB_USER: keycloak
DB_PASSWORD: post_keycloak_pwd123
DB_ADDR: keycloak_db
DB_DATABASE: keycloak
DB_PORT: 5432
depends_on:
- keycloak_db
keycloak_db:
image: postgres
restart: always
networks:
- keycloak-network
ports:
- 5433:5432
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: post_keycloak_pwd123
library_db:
image: postgres
networks:
- keycloak-network
restart: always
ports:
- 5432:5432
volumes:
- ./sql/migrations.sql:/docker-entrypoint-initdb.d/1-migrations.sql
- ./sql/data.sql:/docker-entrypoint-initdb.d/2-data.sql
environment:
POSTGRES_DB: library_db
POSTGRES_PASSWORD: post_pwd123
networks:
keycloak-network:
driver: bridge