-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
164 lines (156 loc) · 5.64 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version: "3"
services:
controller:
image: ghcr.io/bcgov/vc-authn-oidc:sha-14ce368
entrypoint: /bin/bash
command: >
-c "
cp -r /app/api/templates/2060/* /app/api/templates/assets &&
if [ $DEBUGGER ] && [ "$DEBUGGER" == "true" ]; then
echo 'Starting in debug mode...'
pip install debugpy -t /tmp && \
python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn api.main:app --reload --host 0.0.0.0 --port 5000;
else
echo 'Starting in production mode...'
uvicorn api.main:app --reload --host 0.0.0.0 --port 5000;
fi"
environment:
- DEBUGGER=${DEBUGGER}
- LOG_LEVEL=${LOG_LEVEL}
- LOG_WITH_JSON=${LOG_WITH_JSON}
- DB_HOST=${MONGODB_HOST}
- DB_PORT=${MONGODB_PORT}
- DB_NAME=${MONGODB_NAME}
- OIDC_CONTROLLER_DB_USER=${OIDC_CONTROLLER_DB_USER}
- OIDC_CONTROLLER_DB_USER_PWD=${OIDC_CONTROLLER_DB_USER_PWD}
- CONTROLLER_URL=${CONTROLLER_URL}
- CONTROLLER_CAMERA_REDIRECT_URL=${CONTROLLER_CAMERA_REDIRECT_URL}
- CONTROLLER_PRESENTATION_EXPIRE_TIME=${CONTROLLER_PRESENTATION_EXPIRE_TIME}
- CONTROLLER_PRESENTATION_CLEANUP_TIME=${CONTROLLER_PRESENTATION_CLEANUP_TIME}
- CONTROLLER_SESSION_TIMEOUT_CONFIG_FILE=${CONTROLLER_SESSION_TIMEOUT_CONFIG_FILE}
- ACAPY_TENANCY=${AGENT_TENANT_MODE}
- ACAPY_AGENT_URL=${AGENT_ENDPOINT}
- ACAPY_ADMIN_URL=${AGENT_ADMIN_URL}
- MT_ACAPY_WALLET_ID=${MT_ACAPY_WALLET_ID}
- MT_ACAPY_WALLET_KEY=${MT_ACAPY_WALLET_KEY}
- ST_ACAPY_ADMIN_API_KEY=${AGENT_ADMIN_API_KEY}
- ST_ACAPY_ADMIN_API_KEY_NAME=${ST_ACAPY_ADMIN_API_KEY_NAME}
- USE_OOB_PRESENT_PROOF=${USE_OOB_PRESENT_PROOF}
- USE_OOB_LOCAL_DID_SERVICE=${USE_OOB_LOCAL_DID_SERVICE}
- USE_URL_DEEP_LINK=${USE_URL_DEEP_LINK}
- WALLET_DEEP_LINK_PREFIX=${WALLET_DEEP_LINK_PREFIX}
ports:
- ${CONTROLLER_SERVICE_PORT}:5000
- 5678:5678
volumes:
- ./theme/vc-auth/assets:/app/api/templates/2060
- ./theme/vc-auth/verified_credentials.html:/app/api/templates/verified_credentials.html
- ./oidc-controller/sessiontimeout.json:/tmp/sessiontimeout.json
depends_on:
- controller-db
- keycloak_theme
networks:
- vc_auth
controller-db:
image: mongo:7.0
environment:
- MONGO_INITDB_ROOT_USERNAME=${OIDC_CONTROLLER_DB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${OIDC_CONTROLLER_DB_USER_PWD}
- MONGO_INITDB_DATABASE=${MONGODB_NAME}
volumes:
- controller-db-data:/data/db
- ./mongo/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
ports:
- ${MONGODB_PORT}:27017
restart: unless-stopped
networks:
- vc_auth
keycloak:
image: quay.io/keycloak/keycloak:23.0.5
command: start-dev --import-realm --http-relative-path=/auth --features=preview
ports:
- 8880:8080
volumes:
- ./keycloak/config:/opt/keycloak/data/import
- ./theme/login:/opt/keycloak/themes/2060/login
environment:
KC_HOLOGRAM: "vc-authn"
KC_HOLOGRAM_AUTH: ""
KC_DB: ${KEYCLOAK_DB_VENDOR}
KC_DB_URL: jdbc:postgresql://${KEYCLOAK_DB_ADDR}/keycloak
# DB_DATABASE: ${KEYCLOAK_DB_NAME}
KC_DB_USERNAME: ${KEYCLOAK_DB_USER}
KC_DB_PASSWORD: ${KEYCLOAK_DB_PASSWORD}
KEYCLOAK_ADMIN: ${KEYCLOAK_USER}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_PASSWORD}
# KEYCLOAK_LOGLEVEL: ${KEYCLOAK_LOGLEVEL}
# ROOT_LOGLEVEL: ${KEYCLOAK_ROOT_LOGLEVEL}
#
# The following parameter addresses a redirect error on logout in later (post KC 16 at least).
# It may be fixable by updating the vue app as well -- google "keycloak error Invalid parameter: redirect_uri"
KC_SPI_LOGIN_PROTOCOL_OPENID_CONNECT_LEGACY_LOGOUT_REDIRECT_URI: "true"
depends_on:
- keycloak-db
- keycloak_theme
networks:
- vc_auth
keycloak-db:
image: postgres:15.1-alpine
environment:
- POSTGRES_USER=${KEYCLOAK_DB_USER}
- POSTGRES_PASSWORD=${KEYCLOAK_DB_PASSWORD}
- POSTGRES_DB=${KEYCLOAK_DB_NAME}
volumes:
- keycloak-db-data:/var/lib/pgsql/data
networks:
- vc_auth
keycloak_theme:
image: io2060/2060-theme:main
command: ["sh", "-c", "cp -r /app/. /theme"]
volumes:
- ./theme:/theme
networks:
- vc_auth
service-agent:
image: io2060/2060-service-agent:dev
environment:
- AGENT_LABEL=${AGENT_NAME}
- AGENT_ENDPOINT=${AGENT_ENDPOINT}
- AGENT_WALLET_ID=oidc_agent_wallet
- AGENT_PORT=${AGENT_HTTP_PORT}
- ADMIN_PORT=${AGENT_ADMIN_PORT}
- AGENT_WALLET_KEY=${WALLET_ENCRYPTION_KEY}
- PUBLIC_API_BASE_URL=http://service-agent:${AGENT_HTTP_PORT}
- AGENT_LOG_LEVEL=4
- ADMIN_LOG_LEVEL=3
- EVENTS_BASE_URL=${CONTROLLER_WEB_HOOK_URL}
ports:
- ${AGENT_ADMIN_PORT}:${AGENT_ADMIN_PORT}
- ${AGENT_HTTP_PORT}:${AGENT_HTTP_PORT}
networks:
- vc_auth
volumes:
- ./afj:/root/.afj
frontend:
image: io2060/dashboard-frontend:dev
environment:
- NEXT_PUBLIC_BACKEND_BASE_PATH=
- NEXT_PUBLIC_KEYCLOAK_URL=http://localhost:8880/auth/realms/vc-authn
- NEXT_PUBLIC_KEYCLOAK_CLIENT_ID=vue-fe
- NEXT_PUBLIC_KEYCLOAK_REDIRECT_URI=http://localhost:8080/
- NEXT_PUBLIC_KEYCLOAK_POST_LOGOUT_REDIRECT_URI=http://localhost:8080/
- NEXT_PUBLIC_KEYCLOAK_PRES_REQ_CONF_ID=email
- NEXT_PUBLIC_TEMPLATE_DIR=2060-io/dashboard-templates
- NEXT_PUBLIC_TEMPLATE_BRANCH=main
- NEXT_PUBLIC_TEMPLATE_SCHEMA_DIR=Fastbot/schema.yml
ports:
- 8080:3000
networks:
- vc_auth
networks:
vc_auth:
driver: bridge
volumes:
controller-db-data:
keycloak-db-data:
theme: