Add detailed inline comments to app.py, Dockerfile, and docker-compose.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kamaji
2026-01-26 06:04:30 -06:00
parent 9f45ed3452
commit 30fc55567c
3 changed files with 137 additions and 24 deletions

View File

@@ -1,11 +1,37 @@
# ---------------------------------------------------------------------------
# APtool Docker Compose configuration
# ---------------------------------------------------------------------------
# Run with: docker compose up -d --build
# Logs: docker compose logs -f aptool
# Rebuild: docker compose up -d --build (after code changes)
# Stop: docker compose down
# ---------------------------------------------------------------------------
services:
aptool:
# Build the image from the Dockerfile in this directory (.)
build: .
# Map host port 5000 -> container port 5000.
# Access the app at http://<host-ip>:5000
ports:
- "5000:5000"
volumes:
# Bind-mount the uploads directory so photos persist outside the
# container. Without this, uploaded files would be lost on restart.
- ./uploads:/app/uploads
# Bind-mount sites.conf so you can edit it on the host without
# rebuilding the image. The app re-reads this file on every login
# attempt, so changes take effect immediately.
- ./sites.conf:/app/sites.conf
# Load environment variables from .env file. This file contains
# sensitive Nextcloud credentials (NC_URL, NC_USER, NC_PASS) and
# the Flask SECRET_KEY. It is excluded from git via .gitignore.
env_file:
- .env
# Restart the container automatically unless explicitly stopped
# with "docker compose down" or "docker stop". Survives host reboots.
restart: unless-stopped