forked from paulscherrerinstitute/alphafold-on-fire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
67 lines (63 loc) · 1.59 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
---
version: "3.8"
services:
postgres:
container_name: postgres-aof
image: postgres:14-alpine
restart: always
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=aof
volumes:
- aof-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d aof -U admin"]
keycloak:
container_name: keycloak-aof
image: quay.io/keycloak/keycloak:15.1.0
volumes:
- ./keycloak:/tmp/io
environment:
- DB_VENDOR=h2 # force keycloak to use its internal DB
# (it autodetects the running postgres instance)
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- KEYCLOAK_IMPORT=/tmp/io/dev-realm.json
- KEYCLOAK_STATISTICS=all # enables the health endpoint under 9990
ports:
- 8080:8080
- 9990:9990
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:9990/health || exit 1"
]
start_period: 1m30s # realm import seems to take some time
app:
container_name: app-aof
depends_on:
- postgres
build:
context: .
target: development
volumes:
- .:/usr/src/aof
environment:
- VERSION=dev
- RELEASEID=dev
- DB_URI=postgresql+asyncpg://admin:admin@postgres/aof
- DB_ECHO=True
- DB_HIDE_PARAMS=False
ports:
- 8000:8000
command: uvicorn app.main:app --host 0.0.0.0 --reload
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://localhost:8000/health || exit 1"
]
volumes:
aof-postgres-data: null