-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.test.yaml
More file actions
138 lines (131 loc) · 3.12 KB
/
docker-compose.test.yaml
File metadata and controls
138 lines (131 loc) · 3.12 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
services:
socket-proxy:
image: linuxserver/socket-proxy:3.2.9
environment:
ALLOW_START: 1
ALLOW_STOP: 1
CONTAINERS: 1
EXEC: 1
POST: 1
VERSION: 1
read_only: true
tmpfs:
- /run
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
networks:
- backup
backup:
build: ./src
environment:
- DOCKER_HOST=tcp://socket-proxy:2375
- RESTIC_REPOSITORY=/restic_data
- RESTIC_PASSWORD=test_password_for_integration_tests
- AUTO_BACKUP_ALL=false
- LOG_LEVEL=debug
- INCLUDE_PROJECT_NAME=false
- EXCLUDE_BIND_MOUNTS=false
- RESTIC_KEEP_DAILY=7
- RESTIC_KEEP_WEEKLY=4
- RESTIC_KEEP_MONTHLY=12
- RESTIC_KEEP_YEARLY=3
volumes:
- ./test_restic_data:/restic_data
- ./test_restic_cache:/cache
- ./src:/stack-back
networks:
- backup
depends_on:
socket-proxy:
condition: service_started
mysql:
condition: service_healthy
mariadb:
condition: service_healthy
postgres:
condition: service_healthy
web:
image: nginx:alpine
labels:
stack-back.volumes: true
stack-back.volumes.include: "data"
volumes:
- web_data:/usr/share/nginx/html
- ./test_data/web:/srv/data
networks:
- test-network
mysql:
image: mysql:8
labels:
stack-back.mysql: true
environment:
- MYSQL_ROOT_PASSWORD=test_root_password
- MYSQL_DATABASE=testdb
- MYSQL_USER=testuser
- MYSQL_PASSWORD=testpassword
volumes:
- mysql_data:/var/lib/mysql
networks:
- test-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-ptest_root_password"]
interval: 5s
timeout: 3s
retries: 10
mariadb:
image: mariadb:11
labels:
stack-back.mariadb: true
environment:
- MARIADB_ROOT_PASSWORD=test_root_password
- MARIADB_DATABASE=testdb
- MARIADB_USER=testuser
- MARIADB_PASSWORD=testpassword
volumes:
- mariadb_data:/var/lib/mysql
networks:
- test-network
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 3s
retries: 10
postgres:
image: postgres:17
labels:
stack-back.postgres: true
environment:
- POSTGRES_USER=testuser
- POSTGRES_PASSWORD=testpassword
- POSTGRES_DB=testdb
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- test-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 5s
timeout: 3s
retries: 10
# Service to test exclude patterns
excluded_service:
image: alpine:latest
command: tail -f /dev/null
labels:
stack-back.volumes: false
volumes:
- excluded_data:/data
networks:
- test-network
volumes:
web_data:
mysql_data:
mariadb_data:
postgres_data:
excluded_data:
networks:
backup:
driver: bridge
test-network:
driver: bridge