-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
53 lines (49 loc) · 964 Bytes
/
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
services:
# Serviço do MySQL
db:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ponte_db
MYSQL_USER: prisma
MYSQL_PASSWORD: password
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
networks:
- app-networks
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
interval: 10s
retries: 5
start_period: 30s
timeout: 5s
# Serviço do backend
backend:
build:
context: ./Back
ports:
- "3003:3003"
environment:
DATABASE_URL: mysql://root:root@db:3306/ponte_db
depends_on:
db:
condition: service_healthy
networks:
- app-networks
# Serviço do frontend
frontend:
build:
context: ./Ponte
ports:
- "3000:3000"
depends_on:
- backend
networks:
- app-networks
volumes:
db_data:
networks:
app-networks: