forked from gonzalezivan90/biotablero_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (63 loc) · 1.42 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
version: '3.6'
services:
mongo:
image: mongo:3.6.17-xenial
container_name: mongodb
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: admin_mongodb
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: biotablero
ports:
- 27017:27017
volumes:
- mongo_storage:/data/db
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
networks:
biotablero_net:
aliases:
- "biotablerodb"
biotablero-api:
build: .
image: biotablero:latest
container_name: biotablero
restart: always
depends_on:
- mongo
ports:
- 8000:8000
env_file:
- ./s3.env
deploy:
replicas: 5
restart_policy:
max_attempts: 3
condition: on-failure
update_config:
parallelism: 3
delay: 10s
volumes:
- /data:/data
networks:
biotablero_net:
aliases:
- "biotablero-api"
load_balancer:
image: nginx:latest
container_name: nginx-loadbalancer
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- biotablero_net
depends_on:
- biotablero-api
deploy:
placement:
constraints: [node.role == manager]
volumes:
mongo_storage:
networks:
biotablero_net:
driver: overlay