-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (79 loc) · 2.09 KB
/
Copy pathdocker-compose.yml
File metadata and controls
85 lines (79 loc) · 2.09 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
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
services:
photoquince-mysql:
image: mysql:8.0
container_name: photoquince-mysql
env_file: .env
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: photography_db
volumes:
- mysql-data:/var/lib/mysql
# Solo descomenta si necesitas acceso directo desde el host
ports:
- "3306:3306"
networks:
- photoquince-network
restart: unless-stopped
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "${DB_USERNAME}", "-p${DB_PASSWORD}"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
photoquince-backend:
image: antred1/photoquince-backend:latest
container_name: photoquince-backend
networks:
- photoquince-network
restart: unless-stopped
depends_on:
photoquince-mysql:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:8080/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
photoquince-frontend:
image: antred1/photoquince-frontend:latest
container_name: photoquince-frontend
env_file: .env
networks:
- photoquince-network
restart: unless-stopped
depends_on:
- photoquince-backend
photoquince-backoffice:
image: antred1/photoquince-backoffice:latest
container_name: photoquince-backoffice
env_file: .env
networks:
- photoquince-network
restart: unless-stopped
depends_on:
- photoquince-backend
nginx:
image: nginx:stable-alpine
container_name: photoquince-nginx
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
photoquince-backend:
condition: service_healthy
photoquince-frontend:
condition: service_started
photoquince-backoffice:
condition: service_started
networks:
- photoquince-network
restart: unless-stopped
volumes:
mysql-data:
networks:
photoquince-network:
driver: bridge