-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
91 lines (83 loc) · 1.96 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3"
services:
wd-mongodb:
image: mongo:5.0
container_name: wd-mongodb
ports:
- "27017:27017"
environment:
- MONGO_INITDB_DATABASE=waterdip
- MONGO_INITDB_ROOT_USERNAME=dbuser
- MONGO_INITDB_ROOT_PASSWORD=dbpass
volumes:
# seeding scripts
- ./scripts/mongo-entrypoint:/docker-entrypoint-initdb.d
# named volumes
- mongodb:/data/db
- mongoconfig:/data/configdb
networks:
- waterdip
wd-redis:
image: "redis:alpine"
command: redis-server
container_name: wd-redis
ports:
- "6379:6379"
volumes:
- redis:/var/lib/redis
- redisconfig:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
networks:
- waterdip
wd-backend:
image: waterdip/wd-server
build:
context: .
dockerfile: ./docker/backend.Dockerfile
ports:
- "4422:4422"
environment:
- WD_MONGODB_URL=mongodb://dbuser:dbpass@wd-mongodb:27017/waterdip
- WD_MONGODB_DATABASE=waterdip
networks:
- waterdip
depends_on:
- wd-mongodb
- wd-redis
wd-processor:
image: waterdip/wd-server
command: celery --app=waterdip.celery_app worker --beat --loglevel=info
build:
context: .
dockerfile: ./docker/backend.Dockerfile
environment:
- WD_MONGODB_URL=mongodb://dbuser:dbpass@wd-mongodb:27017/waterdip
- WD_MONGODB_DATABASE=waterdip
- WD_REDIS_URL=redis://wd-redis:6379
depends_on:
- wd-redis
networks:
- waterdip
wd-frontend:
image: waterdip/wd-frontend
build:
context: .
dockerfile: ./docker/frontend.Dockerfile
ports:
- "4433:4433"
environment:
- REACT_APP_API_URL=http://127.0.0.1:4422
networks:
- waterdip
depends_on:
- wd-backend
volumes:
# default dir on Ubuntu: /var/lib/docker/volumes
mongodb:
mongoconfig:
redis:
redisconfig:
networks:
waterdip:
driver: bridge