-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
60 lines (56 loc) · 1.46 KB
/
Copy pathdocker-compose-prod.yml
File metadata and controls
60 lines (56 loc) · 1.46 KB
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
version: '3.8'
services:
mysql:
image: ivandam14/goldenline:mysql
container_name: proyecto-mysql
restart: unless-stopped
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: projectdb
networks:
- proyecto-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-prootpassword"]
interval: 12s
timeout: 10s
retries: 5
backend:
image: ivandam14/goldenline:backend
container_name: proyecto-backend
restart: unless-stopped
ports:
- "8081:8081"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/projectdb?createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: rootpassword
networks:
- proyecto-network
depends_on:
mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/health"]
interval: 30s
timeout: 10s
retries: 5
frontend:
image: ivandam14/goldenline:frontend
container_name: proyecto-frontend
restart: unless-stopped
ports:
- "3000:3000"
networks:
- proyecto-network
depends_on:
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
proyecto-network:
driver: bridge