-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
127 lines (118 loc) · 3.32 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
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
services:
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: prompt-core-server
depends_on:
db:
condition: service_healthy
keycloak:
condition: service_healthy
ports:
- "8080:8080"
environment:
- CORE_HOST=http://localhost:3000
- DB_USER=prompt-postgres
- DB_PASSWORD=prompt-postgres
- DB_HOST=localhost
- DB_PORT=5432
- DB_NAME=prompt
- SSL_MODE=disable
- SERVER_ADDRESS=0.0.0.0:8080
- KEYCLOAK_HOST=localhost:8081
- KEYCLOAK_REALM_NAME=prompt
- KEYCLOAK_CLIENT_ID=prompt-server
- KEYCLOAK_CLIENT_SECRET=TvoTuMQWcwXTk8bqY49ElCVz8JthXyMb #DO NOT USE IN PRODUCTION !!!
- KEYCLOAK_ID_OF_CLIENT=a584ca61-fa83-4e95-98b6-c5f3157ae4b4
- KEYCLOAK_AUTHORIZED_PARTY=prompt-client
core:
build:
context: ./clients/core
dockerfile: Dockerfile
container_name: prompt-client-core
ports:
- "3000:80"
depends_on:
- clients-base
template_component:
build:
context: ./clients/template_component
dockerfile: Dockerfile
container_name: prompt-client-template-component
ports:
- "3001:80"
depends_on:
- clients-base
clients-base:
build:
context: ./clients
dockerfile: Dockerfile
image: base:latest
db:
image: 'postgres:15.2-alpine'
container_name: prompt-core-db
environment:
- POSTGRES_USER=prompt-postgres
- POSTGRES_PASSWORD=prompt-postgres
- POSTGRES_DB=prompt
- TZ=Europe/Berlin
volumes:
- ./postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d prompt -U prompt-postgres"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
keycloak-db:
image: "postgres:15.2-alpine"
container_name: prompt-keycloak-db
environment:
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=keycloak
- POSTGRES_DB=keycloak
- TZ=Europe/Berlin
volumes:
- ./keycloak_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U keycloak -d keycloak"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5431:5432"
keycloak:
image: quay.io/keycloak/keycloak:21.0
container_name: prompt-keycloak
environment:
KC_DB: postgres
KC_DB_URL_HOST: keycloak-db
KC_DB_URL_PORT: 5432
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
entrypoint: /opt/keycloak/bin/kc.sh start-dev
depends_on:
keycloak-db:
condition: service_healthy
restart: unless-stopped
ports:
- "127.0.0.1:8081:8080"
healthcheck:
test:
[
"CMD-SHELL",
'exec 3<>/dev/tcp/localhost/8080; echo -e "GET /health/ready HTTP/1.1\nhost: localhost:8080\n" >&3; timeout --preserve-status 1 cat <&3 | grep -m 1 status | grep -m 1 UP; ERROR=$?; exec 3<&-; exec 3>&-; exit'
]
postfix:
image: ghcr.io/ls1admin/postfix:latest
container_name: prompt-postfix
restart: unless-stopped
volumes:
- ./postfix-config:/config # See https://github.com/ls1admin/postfix-container-tum-mailrelay/tree/main for details
hostname: prompt.ase.cit.tum.de
ports:
- "25:25"