forked from sahat/hackathon-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·76 lines (69 loc) · 1.76 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
version: '3.8'
services:
mongo:
image: mongo:4.4
volumes:
- mongo-data:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:16
ports:
- "5432:5432" # Expose PostgreSQL on port 5432 of the host machine
environment:
POSTGRES_DB: publicphone
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
GUACAMOLE_DB: guacamole_db
GUACAMOLE_USER: guacamole_user
GUACAMOLE_PASSWORD: admin
volumes:
- postgres-data:/var/lib/postgresql/data
- ./initdb/:/docker-entrypoint-initdb.d/ # Mount the directory containing initdb.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d publicphone"]
interval: 10s
timeout: 5s
retries: 5
guacd:
image: guacamole/guacd
ports:
- "4822:4822"
restart: always
guacamole:
image: guacamole/guacamole
depends_on:
- guacd
- postgres
- mongo
environment:
GUACD_HOSTNAME: guacd
POSTGRES_HOSTNAME: postgres
POSTGRES_DATABASE: guacamole_db
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
GUAC_POSTGRES_URI: postgresql://guacadmin@postgres:5432/guacamole_db
ports:
- "8081:8080"
restart: always
web:
build: .
ports:
- "8080:8080"
environment:
- MONGODB_URI=mongodb://mongo:27017/test
- POSTGRES_URI=postgresql://admin:admin@postgres:5432/publicphone
- GUAC_POSTGRES_URI=postgresql//guacadmin@postgres:5432/guacamole_db
depends_on:
mongo:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
postgres-data:
mongo-data:
networks:
default: