-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (61 loc) · 1.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
66 lines (61 loc) · 1.2 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
version: "3"
services:
node:
image: "node:csc"
build:
context: ./
dockerfile: node_dockerfile.txt
environment:
- NODE_ENV=production
- PORT=80
env_file: secrets/node.env
depends_on:
- redis
- postgres
- mongo
ports:
- "80:80"
networks:
- redis
- postgres
- mongo
command: "npm start"
redis:
image: redis:5
volumes:
- redis_dbdata:/data
- ./redis.conf:/etc/redis.conf:ro
networks:
- redis
expose:
- "6379"
command: "/usr/local/bin/redis-server /etc/redis.conf"
postgres:
image: postgres:11
volumes:
- ./postgres.conf:/etc/postgresql/postgresql.conf:ro
- postgres_dbdata:/var/lib/postgresql/data
env_file: secrets/postgres.env
networks:
- postgres
expose:
- "5432"
mongo:
# Be careful about the mongodb version
# See how their versioning system works to understand why
image: mongo:4.0-xenial
volumes:
- mongo_dbdata:/data/db
env_file: secrets/mongo.env
networks:
- mongo
expose:
- "27017"
networks:
redis:
postgres:
mongo:
volumes:
postgres_dbdata:
redis_dbdata:
mongo_dbdata: