-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
73 lines (68 loc) · 2.01 KB
/
docker-compose.dev.yml
File metadata and controls
73 lines (68 loc) · 2.01 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
x-flowker-mongodb-common: &flowker-mongodb-common
image: mongo:7.0
restart: always
environment:
MONGO_REPLICA_SET: ${MONGO_REPLICA_SET:-rs0}
command: ["mongod", "--replSet", "${MONGO_REPLICA_SET:-rs0}", "--bind_ip_all"]
healthcheck:
test: ["CMD-SHELL", "mongosh \"mongodb://localhost:27017\" --quiet --eval \"db.adminCommand('ping')\""]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- flowker-network
services:
flowker-mongodb:
<<: *flowker-mongodb-common
container_name: flowker-mongodb
ports:
- ${MONGO_PORT:-27017}:27017
volumes:
- mongodb-dev-data:/data/db
flowker-mongodb-init:
image: mongo:7.0
container_name: flowker-mongodb-init
env_file:
- .env
environment:
MONGO_REPLICA_SET: ${MONGO_REPLICA_SET:-rs0}
MONGO_APP_USER: ${MONGO_APP_USER:-flowker}
MONGO_APP_PASSWORD: ${MONGO_APP_PASSWORD:-flowkerpass}
MONGO_DB_NAME: ${MONGO_DB_NAME:-flowker}
# Use localhost so the Go app running outside Docker can connect
MONGO_PRIMARY_HOST: localhost
volumes:
- ./mongodb/init-single.sh:/scripts/init-single.sh:ro
command: ["bash", "/scripts/init-single.sh"]
depends_on:
flowker-mongodb:
condition: service_healthy
networks:
- flowker-network
restart: "no"
flowker-audit-postgres:
image: postgres:16-alpine
container_name: flowker-audit-postgres
environment:
POSTGRES_USER: ${AUDIT_DB_USER:-flowker_audit}
POSTGRES_PASSWORD: ${AUDIT_DB_PASSWORD:-flowker_audit}
POSTGRES_DB: ${AUDIT_DB_NAME:-flowker_audit}
ports:
- "${AUDIT_DB_PORT:-5432}:5432"
volumes:
- audit-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${AUDIT_DB_USER:-flowker_audit}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
networks:
- flowker-network
volumes:
mongodb-dev-data:
audit-postgres-data:
networks:
flowker-network:
driver: bridge