-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (57 loc) · 1.26 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
version: '3'
services:
covinfo_db_service:
container_name: covinfo_db
restart: always
image: postgres
environment:
POSTGRES_DB: covinfo
POSTGRES_USER: user_covinfo
POSTGRES_PASSWORD: pgpassword
ports:
- '5432:5432'
networks:
- network-api
volumes:
- ./dados:/var/lib/postgresql/data
redis:
container_name: redis_queue
image: redis
command: ['redis-server', '--bind', 'redis', '--port', '6379']
ports:
- '6379:6379'
networks:
- network-queue
covinfo_api_service:
container_name: covinfo_api_container
image: covinfo_api_image
depends_on:
- covinfo_db_service
- redis
command: bash -c "yarn sequelize db:migrate && yarn sequelize db:seed:undo:all && yarn sequelize db:seed:all && yarn start"
build: ./
volumes:
- .:/app
- /app/node_modules
ports:
- '3333:3333'
networks:
- network-api
- network-queue
api-queue:
build: ./
image: covinfo_image
command: yarn queue
depends_on:
- covinfo_db_service
- redis
networks:
- network-api
- network-queue
networks:
network-api:
external:
name: network-api
network-queue:
external:
name: network-queue