forked from fga-eps-mds/2020.2-Violeta-Desenvolvimento
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·139 lines (131 loc) · 3.28 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: '3'
networks:
services:
driver: bridge
services:
db:
image: postgres
container_name: postgres_db_${ENV}
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
- services
ports:
- "${DB_PORT}:5432"
frontend:
container_name: frontend_${ENV}
build: ./frontend
volumes:
- './frontend:/frontend'
- '/frontend/node_modules'
ports:
- '${FRONTEND_PORT}:3000'
networks:
- services
environment:
- NODE_ENV=${NODE_ENV}
- REACT_APP_ENV=${NODE_ENV}
questionario:
build: ./questionario
container_name: questionario_${ENV}
command: ash docker-entrypoint.sh
volumes:
- ./questionario:/questionario
environment:
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_HOST: postgres_db_${ENV}
DB_PORT: ${POSTGRES_PORT}
BASE_URL: ${BASE_URL_QUESTIONARIO}
ports:
- "${QUESTIONARIO_PORT}:8001"
networks:
- services
depends_on:
- db
- frontend
frases:
build: ./frases
container_name: frases_${ENV}
command: ash docker-entrypoint.sh
volumes:
- ./frases:/frases
ports:
- "${FRASES_PORT}:8002"
networks:
- services
environment:
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_HOST: postgres_db_${ENV}
DB_PORT: ${POSTGRES_PORT}
BASE_URL: ${BASE_URL_FRASES}
depends_on:
- db
- frontend
depoimentos:
build: ./depoimentos
container_name: depoimentos_${ENV}
command: ash docker-entrypoint.sh
volumes:
- ./depoimentos:/depoimentos
ports:
- "${DEPOIMENTOS_PORT}:8003"
networks:
- services
environment:
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_HOST: postgres_db_${ENV}
DB_PORT: ${POSTGRES_PORT}
BASE_URL: ${BASE_URL_DEPOIMENTOS}
depends_on:
- db
- frontend
autenticador:
build: ./autenticador
container_name: autenticador_${ENV}
command: ash docker-entrypoint.sh
volumes:
- ./autenticador:/autenticador
ports:
- "${AUTENTICADOR_PORT}:8004"
networks:
- services
environment:
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
DB_HOST: postgres_db_${ENV}
DB_PORT: ${POSTGRES_PORT}
BASE_URL: ${BASE_URL_AUTENTICADOR}
depends_on:
- db
- frontend
# nginx:
# image: nginx:1.15-alpine
# container_name: nginx_violeta
# ports:
# - "80:80"
# #- "443:443"
# restart: unless-stopped
# networks:
# - services
# environment:
# NAME_SPACE: ${NAME_SPACE}
# volumes:
# - ./configs/nginx.conf:/etc/nginx/nginx.conf
# # - /etc/letsencrypt:/etc/letsencrypt
# links:
# - "questionario"
# - "frontend"
# - "frases"
# - "depoimentos"
# - "autenticador"