-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (95 loc) · 2.65 KB
/
docker-compose.yml
File metadata and controls
101 lines (95 loc) · 2.65 KB
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
version: '3.8'
services:
postgres:
image: pgvector/pgvector:pg16
container_name: ipitch-postgres
environment:
POSTGRES_DB: ipitch
POSTGRES_USER: ipitch
POSTGRES_PASSWORD: ipitch123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
# Initialize databases and enable pgvector on both ipitch and ipitch_interactions
- ./docker/postgres-init:/docker-entrypoint-initdb.d
networks:
- ipitch-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ipitch"]
interval: 10s
timeout: 5s
retries: 5
keycloak-postgres:
image: postgres:16-alpine
container_name: ipitch-keycloak-postgres
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: keycloak123
volumes:
- keycloak_postgres_data:/var/lib/postgresql/data
networks:
- ipitch-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U keycloak"]
interval: 10s
timeout: 5s
retries: 5
keycloak:
image: quay.io/keycloak/keycloak:23.0
container_name: ipitch-keycloak
command: start-dev
environment:
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://keycloak-postgres:5432/keycloak
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: keycloak123
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin123
KC_HEALTH_ENABLED: true
KC_METRICS_ENABLED: true
KC_HOSTNAME_STRICT: false
KC_HTTP_ENABLED: true
ports:
- "8080:8080"
depends_on:
keycloak-postgres:
condition: service_healthy
networks:
- ipitch-network
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8080;echo -e \"GET /health/ready HTTP/1.1\nhost: 127.0.0.1:8080\n\" >&3;timeout --preserve-status 1 cat <&3 | grep -m 1 status | grep -m 1 UP"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0
container_name: ipitch-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
networks:
- ipitch-network
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
volumes:
postgres_data:
driver: local
keycloak_postgres_data:
driver: local
elasticsearch_data:
driver: local
networks:
ipitch-network:
driver: bridge