mirror of
https://github.com/biersoeckli/QuickStack.git
synced 2026-02-11 05:59:23 -06:00
43 lines
1015 B
YAML
43 lines
1015 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
# The PostgreSQL instance to backup
|
|
postgres:
|
|
image: postgres:18
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: testdb
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
# The backup job
|
|
backup-job:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.arm64
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
# Connection parameters to the postgres service
|
|
POSTGRES_HOST: "postgres"
|
|
POSTGRES_PORT: "5432"
|
|
POSTGRES_USER: "postgres"
|
|
POSTGRES_PASSWORD: "password"
|
|
POSTGRES_DB: "testdb"
|
|
|
|
# S3 Configuration (Example using MinIO or AWS)
|
|
S3_ENDPOINT: " " # or http://minio:9000
|
|
S3_BUCKET_NAME: " "
|
|
S3_REGION: " "
|
|
S3_ACCESS_KEY_ID: " "
|
|
S3_SECRET_KEY: " "
|
|
S3_KEY: "backup-2025-01-01.zip"
|