Commit Graph

14 Commits

Author SHA1 Message Date
lukas 360e8f9eaf Make container more robust (#95)
Django CI/CD / build-and-push (push) Has been cancelled
Django CI/CD / test (push) Has been cancelled
Reviewed-on: #95

12 files changed (+149, -66)
Key changes:
1. Monolithic container — Replaced the two-service compose setup (backend + frontend/caddy) with a single timetracker container. Caddy is now built into the image rather than running as a separate container.
2. Supervisord process manager — Added supervisor.conf and installed supervisor in the Dockerfile. entrypoint.sh now delegates to supervisord to manage three processes: Caddy, Gunicorn, and Qcluster — replacing manual trap/signaling logic.
3. Bundled Caddy — The Dockerfile now downloads and installs Caddy v2.9.1 directly into the image (/usr/local/bin/caddy). The Caddyfile was updated to use reverse_proxy localhost:8001 and serves static files from /home/timetracker/app/static.
4. Configurable deployment — Added .env.example with configurable environment variables: TZ, PUID/PGID, TIMETRACKER_EXTERNAL_PORT, DATA_DIR, CSRF_TRUSTED_ORIGINS. docker-compose.yml now references these with sensible defaults.
5. UID/GID flexibility — entrypoint.sh uses usermod/groupmod at startup to remap the timetracker user to the host-specified PUID/PGID, avoiding permission issues with mounted volumes.
6. Database & static files — settings.py now respects DATA_DIR env var for the SQLite database path. STATIC_ROOT changed to BASE_DIR / "static".
7. Dev improvements — New Caddyfile.dev (with browse enabled for static files) and updated Makefile dev-prod target runs Caddy alongside Django in development.
8. Tests — Re-enabled the test step in the Docker build GitHub Actions workflow.
2026-05-12 16:29:34 +00:00
lukas b6014a72e0 .gitignore: add .direnv 2024-08-08 14:49:09 +02:00
lukas e9311225e7 Make setting up and developing easier 2024-06-26 17:18:58 +02:00
lukas 4670568acb Add .DS_Store to .gitignore
Django CI/CD / test (push) Successful in 1m4s
Django CI/CD / build-and-push (push) Successful in 1m34s
2024-01-15 22:09:29 +01:00
lukas d1b9202337 Update poetry.lock
Django CI/CD / test (push) Failing after 1m15s
Django CI/CD / build-and-push (push) Has been skipped
2023-11-30 17:35:44 +01:00
lukas 1df889c45d Fix gitignoring root static folder 2023-02-20 18:20:49 +01:00
lukas 77293f03e9 Add icons
continuous-integration/drone/push Build is passing
2023-02-19 17:20:57 +01:00
lukas da0c8d710b Ignore dist directory
continuous-integration/drone/push Build is passing
2023-01-22 11:02:26 +01:00
lukas 56e5dfaa03 Rename project, part 2 (#42)
continuous-integration/drone/push Build is failing
Reviewed-on: #42
2023-01-20 13:37:46 +00:00
lukas 2f00be455d Rename project (#41)
continuous-integration/drone/push Build is passing
The old naming scheme was causing confusion and probably errors.

Reviewed-on: #41
2023-01-19 19:35:25 +00:00
lukas 2939b4a515 Change to gunicorn
continuous-integration/drone/push Build is passing
2023-01-07 21:09:47 +01:00
lukas 51d5306f91 Add more cache dirs to .gitignore 2023-01-05 12:19:43 +01:00
lukas a115adae28 Ignore db.sqlite3 2023-01-02 20:03:26 +01:00
lukas 6ae46c5d34 Initial commit 2022-12-31 14:18:27 +01:00