services: web: image: nginx:stable-alpine container_name: tamagotchi-studio restart: unless-stopped ports: - "127.0.0.1:18130:80" volumes: - /home/syskiller/docker/tamagotchi/site:/usr/share/nginx/html:ro - /home/syskiller/docker/tamagotchi/nginx-static.conf:/etc/nginx/conf.d/default.conf:ro read_only: true tmpfs: - /var/cache/nginx - /var/run healthcheck: test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/health.txt || exit 1"] interval: 30s timeout: 5s retries: 3 logging: driver: json-file options: max-size: "5m" max-file: "3" backup: image: python:3.13-alpine container_name: tamagotchi-backup restart: unless-stopped stop_grace_period: 10s user: "1000:1000" working_dir: /app command: ["python", "-B", "app.py"] environment: PUBLIC_ORIGIN: https://tama.itosm.co.kr volumes: - /home/syskiller/docker/tamagotchi/source/server:/app:ro - /home/syskiller/docker/tamagotchi/backups:/data read_only: true tmpfs: - /tmp cap_drop: [ALL] security_opt: ["no-new-privileges:true"] mem_limit: 256m pids_limit: 64 healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/api/health', timeout=3)"] interval: 30s timeout: 5s retries: 3 logging: driver: json-file options: max-size: "5m" max-file: "3"