This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
74 lines (70 loc) · 1.75 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
version: "3.8"
services:
watcher:
container_name: watcher
hostname: watcher
restart: always
build:
context: ./src/watcher
dockerfile: ./Dockerfile
working_dir: /usr/src/app
volumes:
- ./src/watcher:/usr/src/app
ports:
- 4323:4323 #debug
depends_on:
- mongodb
- redis
env_file:
- .env
command: "npm start"
mongodb:
container_name: mongodb4.4
hostname: ${MONGO_HOSTNAME}
image: mongo:4.4.0
volumes:
- ./data/db:/data/db
- ./scripts/mongoinit:/docker-entrypoint-initdb.d:ro
ports:
- 35000:27017
env_file:
- .env
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
healthcheck:
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo -u $${MONGO_INITDB_ROOT_USERNAME} -p $${MONGO_INITDB_ROOT_PASSWORD} --quiet) -eq 1
interval: 10s
start_period: 30s
command: mongod --replSet ${MONGO_REPLICA_SET_NAME}
redis:
image: redis:6-alpine
hostname: ${REDIS_HOSTNAME}
volumes:
- ./data/redis:/data
entrypoint: redis-server --appendonly yes
restart: always
ports:
- 6400:6379
redis-commander:
image: rediscommander/redis-commander:latest
restart: always
environment:
- REDIS_HOSTS=local:${REDIS_HOSTNAME}:6379
ports:
- "6500:8081"
# api:
# container_name: api
# restart: always
# build:
# context: ./api
# dockerfile: Dockerfile
# working_dir: /usr/src/app
# volumes:
# - ./api:/usr/src/app
# ports:
# - 5000:5000
# depends_on:
# - mongodb
# - redis