-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
116 lines (110 loc) · 2.76 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
116 lines (110 loc) · 2.76 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: fmanagement-api
restart: unless-stopped
ports:
- "8000:8000"
environment:
- MONGODB_HOST=mongodb
- MONGODB_PORT=27017
- MONGODB_DATABASE=fmanagement
- S3_ENDPOINT_URL=http://minio:9000
- S3_ACCESS_KEY_ID=minioadmin
- S3_SECRET_ACCESS_KEY=minioadmin
- S3_BUCKET=fmanagement
- S3_REGION=us-east-1
- JWT_SECRET_KEY=${JWT_SECRET_KEY:-change-me-in-production-please}
depends_on:
mongodb:
condition: service_healthy
minio:
condition: service_healthy
networks:
- fmanagement
mongodb:
image: mongodb/mongodb-atlas-local:8.0
container_name: fmanagement-mongodb
hostname: mongodb
restart: unless-stopped
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongodb_data:/data/db
- mongodb_config_data:/data/configdb
environment:
- MONGODB_INITDB_DATABASE=fmanagement
- MONGODB_READY_TIMEOUT=300
healthcheck:
test:
- CMD
- mongosh
- --quiet
- --eval
- "try { rs.status().members.some(m => m.stateStr === 'PRIMARY') ? quit(0) : quit(1) } catch(e) { quit(1) }"
interval: 10s
timeout: 10s
retries: 15
start_period: 90s
logging:
driver: "none"
networks:
- fmanagement
mongo-express:
image: mongo-express:latest
container_name: fmanagement-mongo-express
restart: unless-stopped
ports:
- "8081:8081"
environment:
- ME_CONFIG_MONGODB_URL=mongodb://mongodb:27017/?directConnection=true
- ME_CONFIG_BASICAUTH_USERNAME=admin
- ME_CONFIG_BASICAUTH_PASSWORD=admin
depends_on:
mongodb:
condition: service_healthy
networks:
- fmanagement
minio:
image: minio/minio:latest
container_name: fmanagement-minio
restart: unless-stopped
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
networks:
- fmanagement
minio-init:
image: minio/mc:latest
container_name: fmanagement-minio-init
depends_on:
minio:
condition: service_healthy
entrypoint:
- /bin/sh
- -c
- |
mc alias set local http://minio:9000 minioadmin minioadmin
mc mb --ignore-existing local/fmanagement
networks:
- fmanagement
networks:
fmanagement:
driver: bridge
volumes:
mongodb_data:
mongodb_config_data:
minio_data: