mirror of
https://github.com/replicatedhq/ttl.sh.git
synced 2026-08-25 03:07:15 +00:00
74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
services:
|
|
web:
|
|
image: ghcr.io/replicatedhq/ttlsh-web:latest
|
|
build:
|
|
context: web
|
|
dockerfile: Dockerfile
|
|
platforms:
|
|
- "linux/amd64"
|
|
container_name: ttlsh-web
|
|
restart: always
|
|
pull_policy: always
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
networks:
|
|
- ttlsh-network
|
|
|
|
zot:
|
|
image: ghcr.io/project-zot/zot-linux-amd64:v2.1.18
|
|
container_name: ttlsh-zot
|
|
restart: always
|
|
pull_policy: always
|
|
ports:
|
|
- "127.0.0.1:5000:5000"
|
|
volumes:
|
|
- ./zot-config.json:/etc/zot/config.json:ro
|
|
# Registry blobs live on the host, not in the container layer. Docker
|
|
# creates this directory on first start; zot runs as root so no chown
|
|
# dance is needed. Path matches storage.rootDirectory in zot-config.json.
|
|
- ./zot-data:/var/lib/zot
|
|
networks:
|
|
- ttlsh-network
|
|
|
|
# Tag-driven TTL sidecar. Zot posts image.updated CloudEvents to it (see the
|
|
# events extension in zot-config.json) and it DELETEs manifests once expired.
|
|
zot-ephemeral-ttl:
|
|
image: ghcr.io/replicatedhq/ttlsh-ephemeral-ttl:latest
|
|
build:
|
|
context: sidecar
|
|
dockerfile: Dockerfile
|
|
platforms:
|
|
- "linux/amd64"
|
|
container_name: ttlsh-ephemeral-ttl
|
|
restart: always
|
|
pull_policy: always
|
|
networks:
|
|
- ttlsh-network
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
# Backing store for the sidecar's expiry index.
|
|
redis:
|
|
image: redis:8-alpine
|
|
container_name: ttlsh-redis
|
|
restart: always
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- ttlsh-network
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 30
|
|
start_period: 2s
|
|
|
|
networks:
|
|
ttlsh-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
redis-data:
|