-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
125 lines (115 loc) · 2.44 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
version: '3.7'
networks:
main:
services:
nginx:
image: nginx:1.17.10
container_name: nginx
depends_on:
- products-service
- extracts-service
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
networks:
main:
aliases:
- nginx
products-service:
container_name: products-service
build:
context: ./products-api
dockerfile: Dockerfile
volumes:
- ./products-api:/usr/app
expose:
- '3000'
ports:
- '3000:3000'
environment:
APP_ENV: dev
PORT: 3000
DATABASE_URL: "postgresql://postgres:postgres@net_postgres:5432/net_store?schema=public"
REDIS_PORT: 6379
depends_on:
- net_postgres
links:
- net_postgres:database
- net_redis:redis
command: bash -c "yarn && yarn dev"
restart: on-failure
networks:
main:
aliases:
- products-service
extracts-service:
container_name: extracts-service
build:
context: ./extracts-api/
dockerfile: Dockerfile
volumes:
- ./extracts-api:/usr/app
expose:
- '3001'
ports:
- '3001:3001'
environment:
APP_ENV: dev
PORT: 3001
DB_HOST: net_postgres
DB_PORT: 5432
DB_NAME: net_store
DB_USER: postgres
DB_PASSWORD: postgres
REDIS_PORT: 6379
depends_on:
- net_postgres
links:
- net_postgres:database
- net_redis:redis
command: bash -c "yarn && yarn dev"
restart: on-failure
networks:
main:
aliases:
- extracts-service
postgres:
container_name: net_postgres
image: postgres:11.1
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: net_store
restart: always
networks:
main:
aliases:
- net_postgres
redis:
container_name: net_redis
image: redis:6.2-alpine
ports:
- '6379:6379'
volumes:
- './.data/redis:/data'
networks:
main:
aliases:
- net_redis
restart: always
# rabbitmq:
# container_name: net_rabbitmq
# ports:
# - '15672:15672'
# - '5672:5672'
# image: registry.dotgroup.com.br/dot/centos7-rabbitmq37
# command: /opt/app-root/services.sh
# environment:
# VIRTUAL_HOST: 'rabbitmq'
# networks:
# main:
# aliases:
# - rabbitmq