forked from zerocowl/experimentos-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (82 loc) · 1.69 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
version: "3"
services:
gateway:
build: ./gateway
restart: always
hostname: gateway
env_file:
- .env
ports:
- "8000:8000"
networks:
- backend
- frontend
task:
build: ./task
restart: always
hostname: task
env_file:
- .env
networks:
- backend
links:
- dbtask
token:
build: ./token
restart: always
hostname: token
env_file:
- .env
networks:
- backend
links:
- dbuser
user:
build: ./user
restart: always
hostname: user
env_file:
- .env
networks:
- backend
links:
- dbuser
dbuser:
image: "mongo:3.7"
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE_USER}
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
volumes:
- "./db/user/data/db-files:/data/db"
- "./db/user/init/:/docker-entrypoint-initdb.d/"
ports:
- 27017:27017
networks:
- backend
dbtask:
image: "mongo:3.7"
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE_TASKS}
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
volumes:
- "./db/tasks/data/db-files:/data/db"
- "./db/tasks/init/:/docker-entrypoint-initdb.d/"
ports:
- 27018:27018
command: mongod --port 27018
networks:
- backend
networks:
backend:
driver: bridge
frontend:
external:
name: infrastructure