-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yaml
148 lines (142 loc) · 4.32 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
# docker-compose --profile ory --profile shell up
version: '3.7'
networks:
mojaloop-net:
name: mojaloop-net
volumes:
kratos-sqlite:
services:
reporting-hub-bop-shell:
profiles: ['shell']
# container_name: reporting-hub-bop-shell-one
# container_name: reporting-hub-bop-shell
image: reporting-hub-bop-shell-one:latest
# image: reporting-hub-bop-shell
build:
context: .
# cache_from:
# - mojaloop/reporting-hub-bop-shell
environment:
- LOGIN_URL=http://127.0.0.1:4455/.ory/kratos/public/self-service/login
- LOGOUT_URL=http://127.0.0.1:4455/.ory/kratos/public/self-service/logout/browser
- AUTH_TOKEN_URL=http://127.0.0.1:4455/.ory/kratos/public/sessions/whoami
- AUTH_ENABLED=true
- AUTH_API_BASE_URL=/
- AUTH_MOCK_API=true
- REMOTE_API_BASE_URL=/docker
- REMOTE_MOCK_API=true
- REMOTE_1_URL=http://localhost:8081
- REMOTE_2_URL=http://localhost:8082
- REMOTE_3_URL=http://localhost:8083
- REMOTE_4_URL=http://localhost:8084
- REACT_APP_TITLE=Mojaloop Finance Portal
- REACT_APP_SUBTITLE=Accelarating regional trade through supporting cross boarder, instant lowcost, payments and transfers.
# - REACT_APP_TITLE_IMAGE=
- REACT_APP_TITLE_BAR_COLOR=#911414
# - REACT_APP_DFSP_IMG=
- TEST_TEXT="this is a test"
ports:
- '8080:8080'
networks:
- mojaloop-net
healthcheck:
test: wget -q http://172.17.0.1:8080 -O /dev/null || exit 1
timeout: 20s
retries: 30
interval: 15s
kratos-migrate:
profiles: ['ory']
image: oryd/kratos:v1.1.0
restart: on-failure
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true&mode=rwc
volumes:
- type: volume
source: kratos-sqlite
target: /var/lib/sqlite
read_only: false
- type: bind
source: ./docker/kratos/oidc
target: /etc/config/kratos
networks:
- mojaloop-net
kratos:
profiles: ['ory']
depends_on:
- kratos-migrate
image: oryd/kratos:v1.1.0
restart: unless-stopped
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
- LOG_LEVEL=trace
# - SERVE_PUBLIC_BASE_URL='http://127.0.0.1:4455/.ory/kratos/public/'
volumes:
- type: volume
source: kratos-sqlite
target: /var/lib/sqlite
read_only: false
- type: bind
source: ./docker/kratos/oidc
target: /etc/config/kratos
ports:
- '4433:4433' # public
- '4434:4434' # admin
networks:
- mojaloop-net
mailslurper:
profiles: ['ory']
image: 'oryd/mailslurper:latest-smtps'
ports:
- '4436:4436'
- '4437:4437'
networks:
- mojaloop-net
keycloak:
image: quay.io/keycloak/keycloak:21.1.0
user: root
container_name: keycloak
command: ['start-dev --import-realm']
ports:
- '8080:8080'
depends_on:
mysql-keycloak:
condition: service_healthy
volumes:
- ./docker/keycloak/realm-export.json:/opt/keycloak/data/import/realm.json
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=mysql
- KC_DB_URL_HOST=mysql-keycloak
- KC_DB_URL_DATABASE=keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=password
- KC_HEALTH_ENABLED=true
networks:
- mojaloop-net
healthcheck:
test:
[
'CMD-SHELL',
"exec 3<>/dev/tcp/127.0.0.1/8080;echo -e \"GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n\" >&3;grep \"HTTP/1.1 200 OK\" <&3",
]
timeout: 20s
retries: 10
start_period: 40s
interval: 30s
mysql-keycloak:
image: mysql:8.3.0
container_name: mysql-keycloak
ports:
- '3306:3306'
environment:
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD=password
- MYSQL_ROOT_PASSWORD=root_password
healthcheck:
test: 'mysqladmin ping -u root -p$${MYSQL_ROOT_PASSWORD}'
networks:
- mojaloop-net