-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
62 lines (62 loc) · 1.56 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:
db:
container_name: evolucao_hospitalar_db
restart: always
image: postgres:13.9-alpine
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_NAME}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASS}
ports:
- "${POSTGRES_PORT}:5432"
app:
container_name: evolucao_hospitalar_app
restart: always
build:
context: ./flaskapp
dockerfile: Dockerfile
volumes:
- ./flaskapp:/app
environment:
- SECRET_KEY=${SECRET_KEY}
- MASTER_KEY=${MASTER_KEY}
- POSTGRES_NAME=${POSTGRES_NAME:?nome do BD ausente}
- POSTGRES_USER=${POSTGRES_USER:?usuario do BD ausente}
- POSTGRES_PASS=${POSTGRES_PASS:?senha do BD ausente}
ports:
- "${FLASKAPP_PORT}:5000"
depends_on:
- db
frontend:
container_name: evolucao_hospitalar_frontend
restart: always
build:
context: reactapp
dockerfile: Dockerfile.dev
volumes:
- ./reactapp:/home/node/app:delegated
- ./reactapp/node_modules:/home/node/app/node_modules
environment:
- REACT_APP_API_URL=/api/v1
- CHOKIDAR_USEPOLLING=true
ports:
- "${FRONTEND_PORT}:3000"
stdin_open: true
depends_on:
- app
nginx:
container_name: evolucao_hospitalar_nginx
restart: always
build:
context: .
dockerfile: Dockerfile.nginx
volumes:
- ./nginx/development.conf:/etc/nginx/conf.d/default.conf
ports:
- "${APP_PORT}:80"
depends_on:
- app
- frontend