-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
134 lines (126 loc) · 3.42 KB
/
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
services:
api:
image: registry.gitlab.com/tibhannover/orkg/orkg-backend
environment:
ORKG_KEYCLOAK_HOST: http://keycloak:8080
env_file:
- .env
networks:
- auth
- mail
- database
- rest-api
- simcomp
depends_on:
neo4j:
condition: service_healthy
postgres:
condition: service_healthy
healthcheck:
# We need a health check, so the Gradle plugin knows when the services are ready
test: [ "CMD", "java", "-cp", "@/app/jib-classpath-file", "org.orkg.SpringApplicationKt", "--healthcheck" ]
interval: 5s
timeout: 10s
retries: 60
neo4j:
image: neo4j:5-community
environment:
NEO4J_PLUGINS: '["apoc", "apoc-extended"]'
NEO4J_initial_dbms_default__database: orkg
NEO4J_server_memory_heap_max__size: 4G
NEO4J_db_transaction_timeout: 30s
healthcheck:
test: [ "CMD-SHELL", "/var/lib/neo4j/bin/cypher-shell -u $$(echo $$NEO4J_AUTH | cut -d/ -f1) -p $$(echo $$NEO4J_AUTH | cut -d/ -f2) 'RETURN \"OK\"'" ]
interval: 5s
timeout: 10s
retries: 10
networks:
- database
volumes:
- 'neo4j-data:/data'
postgres:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
interval: 5s
timeout: 10s
retries: 10
networks:
- database
volumes:
- 'postgres-data:/var/lib/postgresql/data/pgdata'
keycloak:
image: registry.gitlab.com/tibhannover/orkg/keycloak-docker-image:26
command:
- start
- --optimized
- --import-realm
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
# KC_HOSTNAME: http://localhost:8888
KC_HOSTNAME_STRICT: false
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://keycloak-postgres:5432/postgres
KC_DB_USERNAME: postgres
KC_DB_PASSWORD: postgres
KC_HTTP_ENABLED: true
TZ: Europe/Berlin
volumes:
- ./keycloak/src/main/resources/import:/opt/keycloak/data/import:ro
depends_on:
keycloak-postgres:
condition:
service_healthy
networks:
- auth
- mail
keycloak-postgres:
image: postgres:17
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
PGDATA: /var/lib/postgresql/data/pgdata
TZ: Europe/Berlin
volumes:
- 'keycloak-data:/var/lib/postgresql/data/pgdata'
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
interval: 5s
timeout: 10s
retries: 10
networks:
- auth
# Mail server. Can be used in Keycloak to test mail flows.
mailserver:
image: axllent/mailpit:v1.21
restart: unless-stopped
environment:
# MP_MAX_MESSAGES: 5000
MP_DATABASE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
volumes:
- mailpit-data:/data
networks:
- mail
networks:
auth:
database:
mail:
rest-api:
simcomp:
# Uncomment the following lines if you want to test against a local SimComp instance:
#name: orkg-simcomp-api_orkg_simcomp_api
#external: true
volumes:
neo4j-data:
postgres-data:
keycloak-data:
mailpit-data: