This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
56 lines (51 loc) · 1.58 KB
/
docker-compose.test.yml
File metadata and controls
56 lines (51 loc) · 1.58 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
# Test overrides - ephemeral volumes, faster health checks
services:
postgres:
volumes: [] # No persistent volume for tests
healthcheck:
interval: 2s
timeout: 2s
retries: 10
postgres-restore:
image: postgres:${POSTGRES_VERSION:-18}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-myapp}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
networks:
- backup-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-myapp}"]
interval: 2s
timeout: 2s
retries: 10
garage:
volumes:
# Keep the config mount, remove data persistence
- ./docker/garage/garage.toml:/etc/garage.toml:ro
healthcheck:
interval: 2s
timeout: 2s
retries: 15
backup:
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: ${POSTGRES_DB:-myapp}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
S3_ENDPOINT: ${S3_ENDPOINT:-http://garage:3900}
S3_BUCKET: ${S3_BUCKET:-backups}
S3_ACCESS_KEY: ${S3_ACCESS_KEY:-GK0123456789abcdef01234567}
S3_SECRET_KEY: ${S3_SECRET_KEY:-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef}
# Restore target for tests
RESTORE_POSTGRES_HOST: postgres-restore
RESTORE_POSTGRES_PORT: 5432
# Disable scheduler in tests - we trigger backups manually
ofelia:
profiles:
- disabled
volumes:
postgres_data: {}
garage_data: {}
garage_meta: {}