-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yaml
44 lines (44 loc) · 999 Bytes
/
docker-compose.yaml
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
version: '3.9'
services:
mongo:
image: mongo:5.0.0
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
volumes:
- ./private/data/mongodb:/data/db
ports:
- "27017:27017"
redis:
image: redis:6.2.4-alpine
ports:
- "6379:6379"
volumes:
- ./private/data/redis:/data
command: redis-server --appendonly yes
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1s
timeout: 3s
retries: 30
users:
build:
context: server/users
environment:
GIN_MODE: release
ports:
- '8081:8081'
volumes:
- ./server/users:/server/users
depends_on:
mongo:
condition: service_healthy
redis:
condition: service_healthy