- Add Redis secure configuration - Update worker configurations for homelab and Docker - Add Forgejo workflow configurations - Update docker-compose files with improved networking - Add Caddy configurations for different environments
78 lines
2 KiB
YAML
78 lines
2 KiB
YAML
services:
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
environment:
|
|
- FETCHML_DOMAIN=localhost
|
|
- CADDY_EMAIL=smoke@example.invalid
|
|
ports:
|
|
- "8080:80"
|
|
- "8443:443"
|
|
volumes:
|
|
- ${FETCHML_REPO_ROOT:-..}/data/prod-smoke/caddy/data:/data
|
|
- ${FETCHML_REPO_ROOT:-..}/data/prod-smoke/caddy/config:/config
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
cat > /etc/caddy/Caddyfile <<'EOF'
|
|
{
|
|
debug
|
|
servers {
|
|
protocols h1 h2
|
|
}
|
|
}
|
|
|
|
https://localhost {
|
|
tls internal {
|
|
protocols tls1.2 tls1.3
|
|
}
|
|
|
|
handle {
|
|
reverse_proxy api-server:9101
|
|
}
|
|
}
|
|
EOF
|
|
exec caddy run --config /etc/caddy/Caddyfile
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
user: "999:999"
|
|
restart: unless-stopped
|
|
expose:
|
|
- "6379"
|
|
volumes:
|
|
- ${FETCHML_REPO_ROOT:-..}/data/prod-smoke/redis:/data
|
|
command: redis-server --appendonly yes
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "ping" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api-server:
|
|
build:
|
|
context: ${FETCHML_REPO_ROOT:-..}
|
|
dockerfile: ${FETCHML_REPO_ROOT:-..}/build/docker/simple.Dockerfile
|
|
user: "0:0"
|
|
restart: unless-stopped
|
|
expose:
|
|
- "9101"
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ${FETCHML_REPO_ROOT:-..}/data/prod-smoke/experiments:/data/experiments
|
|
- ${FETCHML_REPO_ROOT:-..}/data/prod-smoke/active:/data/active
|
|
- ${FETCHML_REPO_ROOT:-..}/data/prod-smoke/logs:/logs
|
|
- ${FETCHML_REPO_ROOT:-..}/configs/api/dev.yaml:/app/configs/api/dev.yaml:ro
|
|
command: ["/bin/sh", "-c", "mkdir -p /data/experiments /data/active/datasets /data/active/snapshots && exec /usr/local/bin/api-server -config /app/configs/api/dev.yaml"]
|
|
environment:
|
|
- LOG_LEVEL=info
|
|
- FETCHML_NATIVE_LIBS=1
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:9101/health" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
volumes: {}
|