-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.test2.yaml
More file actions
60 lines (56 loc) · 1.53 KB
/
docker-compose.test2.yaml
File metadata and controls
60 lines (56 loc) · 1.53 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
services:
# Secondary project web service with volumes
secondary_web:
image: nginx:alpine
labels:
stack-back.volumes: true
stack-back.volumes.include: "secondary_web"
volumes:
- secondary_web_data:/usr/share/nginx/html
- ./test_data/secondary_web:/srv/content
networks:
- secondary-network
# Secondary project MySQL database
secondary_mysql:
image: mysql:8
labels:
stack-back.mysql: true
environment:
- MYSQL_ROOT_PASSWORD=secondary_root_password
- MYSQL_DATABASE=secondary_db
- MYSQL_USER=secondary_user
- MYSQL_PASSWORD=secondary_password
volumes:
- secondary_mysql_data:/var/lib/mysql
networks:
- secondary-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-psecondary_root_password"]
interval: 5s
timeout: 3s
retries: 10
# Secondary project PostgreSQL database
secondary_postgres:
image: postgres:17
labels:
stack-back.postgres: true
environment:
- POSTGRES_USER=secondary_user
- POSTGRES_PASSWORD=secondary_password
- POSTGRES_DB=secondary_db
volumes:
- secondary_postgres_data:/var/lib/postgresql/data
networks:
- secondary-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U secondary_user -d secondary_db"]
interval: 5s
timeout: 3s
retries: 10
volumes:
secondary_web_data:
secondary_mysql_data:
secondary_postgres_data:
networks:
secondary-network:
driver: bridge