-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (76 loc) · 2.05 KB
/
docker-compose.yml
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
version: '3.7'
services:
nginx:
image: 'nginx:1.19.3'
container_name: 'nginx'
networks:
- 'frontend'
- 'backend'
depends_on:
- 'keycloak'
ports:
- '80:80'
volumes:
- './etc/nginx/nginx.conf:/etc/nginx/nginx.conf:ro'
app:
build:
context: 'app'
container_name: 'app'
networks:
- 'backend'
expose:
- '8000'
environment:
- 'ISSUER_URL=http://localhost/keycloak/realms/app'
- 'AUTH_URL=http://localhost/keycloak/realms/app/protocol/openid-connect/auth?client_id=app&response_type=code&redirect_uri=http://localhost/auth/callback'
- 'TOKEN_URL=http://localhost/keycloak/realms/app/protocol/openid-connect/token'
- 'USERINFO_URL=http://localhost/keycloak/realms/app/protocol/openid-connect/userinfo'
- 'JWKS_URL=http://localhost/keycloak/realms/app/protocol/openid-connect/certs'
entrypoint: ["gunicorn", "app:app", "--bind=0.0.0.0:8000", "--workers=4", "--log-level=debug", "--reload"]
keycloak:
image: 'jboss/keycloak:11.0.2'
container_name: 'keycloak'
restart: 'always'
environment:
- 'KEYCLOAK_USER=admin'
- 'KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD}'
- 'DB_VENDOR=postgres'
- 'DB_ADDR=postgres'
- 'DB_PORT=5432'
- 'DB_DATABASE=keycloak'
- 'DB_USER=admin'
- 'DB_PASSWORD=${POSTGRES_PASSWORD}'
- 'PROXY_ADDRESS_FORWARDING=true'
- 'KEYCLOAK_IMPORT=/realm-export.json'
depends_on:
- 'postgres'
networks:
- 'backend'
expose:
- '8080'
- '9990'
command:
- '-b=0.0.0.0'
- '-Djboss.http.port=8080'
volumes:
- './opt/jboss/startup-scripts:/opt/jboss/startup-scripts'
- './realm-export.json:/realm-export.json'
postgres:
image: 'postgres:13.0-alpine'
container_name: 'postgres'
restart: 'always'
environment:
- 'POSTGRES_DB=keycloak'
- 'POSTGRES_USER=admin'
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
networks:
- 'backend'
expose:
- '5432'
volumes:
- 'postgres:/var/lib/postgresql/data'
networks:
frontend:
backend:
volumes:
postgres: