forked from codeedu/pfa-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (52 loc) · 1.1 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
version: "3"
services:
mysql:
image: mysql:5.7
volumes:
- ./dbdata:/var/lib/mysql
- ./database:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=my-secret-pw
- LANG=C.UTF-8
- TZ=America/Sao_Paulo
ports:
- 3306:3306
networks:
- rede-interna
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
web:
build: ./app
environment:
- TZ=America/Sao_Paulo
volumes:
- ./app:/home/app
depends_on:
mysql:
condition: service_healthy
networks:
- rede-externa
- rede-interna
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
timeout: 10s
retries: 5
nginx:
build: ./nginx
ports:
- 8000:80
- 8080:80
depends_on:
web:
condition: service_healthy
networks:
- rede-externa
restart: on-failure
networks:
rede-externa:
driver: bridge
rede-interna:
driver: bridge
internal: true