version: '3.8' services: backend: build: context: ./backend container_name: filenest_backend restart: unless-stopped env_file: - .env volumes: - ./storage:/app/storage - ./data:/app/data expose: - "8000" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 5s timeout: 5s retries: 3 command: > uvicorn main:app --host 0.0.0.0 --port 8000 --workers 2 # cleanup_cron: # image: alpine:latest # container_name: filenest_cleanup_cron # restart: unless-stopped # depends_on: # backend: # condition: service_healthy # entrypoint: /bin/sh -c # command: | # "apk add --no-cache curl && \ # while true; do \ # curl -fsS 'http://backend:8000/cleanup-expired' || echo 'Cleanup call failed'; \ # sleep 3600; \ # done" nginx: build: context: . dockerfile: nginx/Dockerfile container_name: filenest_nginx restart: unless-stopped env_file: - .env ports: - "8082:80" volumes: - ./storage:/app/storage:ro depends_on: backend: condition: service_healthy