ce01a94141
Replace the include_patterns/index_patterns split with a clearer immutable_patterns/mutable_patterns model: - immutable_patterns: artifacts cached indefinitely (no TTL) - mutable_patterns: artifacts that expire and are re-fetched after cache.mutable_ttl seconds (replaces cache.index_ttl) _PACKAGE_INDEX_PATTERNS renamed to _PACKAGE_MUTABLE_PATTERNS; all built-in package-type index patterns (APKINDEX, repomd, manifests, etc.) default to the remote's mutable_ttl (default 1 hour). cache.file_ttl renamed to cache.immutable_ttl for consistency. Adds github-archive remote to remotes.yaml as a worked example showing tag archives as immutable and branch archives as mutable (1-day TTL). docker-compose.yml: fix VERSION=dev → 2.2.2.dev0 (valid PEP 440), add :z SELinux label to volume mounts.
92 lines
2.1 KiB
YAML
92 lines
2.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
artifactapi:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- VERSION=2.2.2.dev0
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./remotes.yaml:/app/remotes.yaml:ro,z
|
|
- ./ca-bundle.pem:/app/ca-bundle.pem:ro,z
|
|
environment:
|
|
- CONFIG_PATH=/app/remotes.yaml
|
|
- DBHOST=postgres
|
|
- DBPORT=5432
|
|
- DBUSER=artifacts
|
|
- DBPASS=artifacts123
|
|
- DBNAME=artifacts
|
|
- REDIS_URL=redis://redis:6379
|
|
- MINIO_ENDPOINT=minio:9000
|
|
- MINIO_ACCESS_KEY=minioadmin
|
|
- MINIO_SECRET_KEY=minioadmin
|
|
- MINIO_BUCKET=artifacts
|
|
- MINIO_SECURE=false
|
|
- REQUESTS_CA_BUNDLE=/app/ca-bundle.pem
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --save 20 1
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_DB: artifacts
|
|
POSTGRES_USER: artifacts
|
|
POSTGRES_PASSWORD: artifacts123
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U artifacts -d artifacts"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
volumes:
|
|
minio_data:
|
|
redis_data:
|
|
postgres_data:
|