-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
88 lines (86 loc) · 2.28 KB
/
docker-compose.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
79
80
81
82
83
84
85
86
87
88
version: '3'
volumes:
postgres_data:
driver: local
services:
postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: quay.io/keycloak/keycloak:latest
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_FRONTEND_URL: http://localhost:8080/auth
# Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.
#JDBC_PARAMS: "ssl=true"
ports:
- 8080:8080
depends_on:
- postgres
gatekeeper:
image: bitnami/keycloak-gatekeeper:latest
ports:
- "3000:3000"
environment:
- KC_CLIENT_ID=$KC_CLIENT_ID
- KC_CLIENT_SECRET=$KC_CLIENT_SECRET
- KC_DISCOVERY_URL=$KC_DISCOVERY_URL
- KC_REDIRECTION_URL=$KC_REDIRECTION_URL
- KC_UPSTREAM_URL=$KC_UPSTREAM_URL
- KC_SECURE_COOKIE=$KC_SECURE_COOKIE
command:
- /keycloak-gatekeeper
- --client-id
- $KC_CLIENT_ID
- --client-secret
- $KC_CLIENT_SECRET
- --discovery-url
- $KC_DISCOVERY_URL
- --openid-provider-proxy
- $KC_PROVIDER_PROXY
- --listen
- :3000
- --redirection-url
- $KC_REDIRECTION_URL
- --upstream-url
- $KC_UPSTREAM_URL
- --enable-refresh-tokens=true
- --encryption-key=F0R5569RZALJI567
- --secure-cookie=$KC_SECURE_COOKIE
- --resources
- uri=/graphql/*
- --resources
- uri=/token/*
- --enable-logout-redirect=true
- --cors-origins
- "*"
- --cors-methods
- GET,POST,OPTIONS
- --cors-headers
- authorization,content-type
links:
- "keycloak:localhost"
gateway:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./src:/app
env_file:
- .env
ports:
- 8000:8000
command:
bash -c "python main.py"