This commit is contained in:
2026-05-08 14:06:08 +02:00
parent b314a683c9
commit b4811fba4a
6 changed files with 366 additions and 25 deletions

63
docker-compose.yml Normal file
View File

@@ -0,0 +1,63 @@
services:
api:
build:
context: .
dockerfile: api.Dockerfile
volumes:
- "./data:/var/lib/cloudsave"
networks:
- cloudsave_net
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8080/heartbeat || exit 1
interval: 3s
timeout: 2s
retries: 3
start_period: 10s
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-router.rule=Host(`${DOMAIN:-localhost}`) && PathPrefix(`/api`)"
- "traefik.http.routers.api-router.entrypoints=web"
- "traefik.http.services.cloudsave-api.loadbalancer.server.port=8080"
web:
build:
context: .
dockerfile: web.Dockerfile
volumes:
- "./config.json:/var/lib/cloudsave/config.json"
networks:
- cloudsave_net
depends_on:
api:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.web-router.rule=Host(`${DOMAIN:-localhost}`) && PathPrefix(`/web`)"
- "traefik.http.routers.web-router.entrypoints=web"
- "traefik.http.services.cloudsave-web.loadbalancer.server.port=8080"
proxy:
image: traefik:3.7.0
ports:
- 127.0.0.1:80:80
- 127.0.0.1:8080:8080
networks:
- cloudsave_net
depends_on:
api:
condition: service_healthy
web:
condition: service_started
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --api.dashboard=true
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --log.level=DEBUG
- --accesslog=true
networks:
cloudsave_net: