Commit Graph

29 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 c10b7a8013 Improve make dev-prod
Django CI/CD / test (push) Successful in 30s
Django CI/CD / build-and-push (push) Successful in 1m23s
2026-05-12 15:27:56 +02:00
lukas 37e3c69abc Make tests more robust, use django-pytest 2026-05-12 11:56:28 +02:00
lukas 016f307240 Upgrade to Tailwind v4 2026-01-29 13:17:04 +01:00
lukas 6b89bab0a6 Switch from poetry to uv
Django CI/CD / test (push) Successful in 9m34s
Django CI/CD / build-and-push (push) Failing after 1m55s
2026-01-27 20:03:39 +01:00
lukas fe6cf2758c make dev does not ignore warnings
Django CI/CD / test (push) Successful in 1m9s
Django CI/CD / build-and-push (push) Successful in 1m55s
2024-06-26 18:35:05 +02:00
lukas e9311225e7 Make setting up and developing easier 2024-06-26 17:18:58 +02:00
lukas 8a7d083fb2 Fix make css 2023-02-18 20:35:59 +01:00
lukas 77268ae92f Add make loadall 2023-01-20 19:58:31 +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 2553d6f9e6 Definitively disable pre-commit hook
continuous-integration/drone/push Build is passing
2023-01-16 19:49:41 +01:00
lukas d8ece979a8 Revert make dev to plain runserver
The runserver_plus has problems with cache not being invalidated
2023-01-13 16:52:05 +01:00
lukas 362732c22a Run make date via poetry 2023-01-08 15:48:12 +01:00
lukas 8e1c670ffd Fix collectstaticfiles causing error
continuous-integration/drone/push Build is passing
Fixes #23
2023-01-08 15:46:09 +01:00
lukas f7b69f7704 Add more utilities to Makefile 2023-01-07 21:59:34 +01:00
lukas 2939b4a515 Change to gunicorn
continuous-integration/drone/push Build is passing
2023-01-07 21:09:47 +01:00
lukas db5de81c09 Add make date 2023-01-05 23:30:43 +01:00
lukas e6b5804e37 Update infra 2023-01-05 21:56:57 +01:00
lukas 2807c5e00e Add pre-commit hook to update version 2023-01-05 21:10:17 +01:00
lukas 869e0e0fe0 Run all python Makefile commands via poetry 2023-01-05 17:12:57 +01:00
lukas 34ce1e9b05 Set up tests, add tests for common.util.time, add %d
continuous-integration/drone/push Build is passing
2023-01-05 15:18:57 +01:00
lukas 67f5090bf8 Rely on poetry for make test
continuous-integration/drone/push Build is passing
2023-01-05 12:19:56 +01:00
lukas b1c8f58855 Add make shell 2023-01-03 22:04:22 +01:00
lukas ec4a095425 Don't initialize in container
continuous-integration/drone/push Build is failing
2023-01-03 12:34:50 +01:00
lukas f2076a6cd0 Replace backslashes with forward slashes
continuous-integration/drone/push Build is failing
2023-01-03 12:14:27 +01:00
lukas 4d52fd21f8 Fix Makefile
continuous-integration/drone/push Build is failing
2023-01-03 00:17:23 +01:00
lukas 9d142126b1 Do not require timestamp_end, initialize db
continuous-integration/drone/push Build is failing
2023-01-03 00:13:26 +01:00
lukas 0f2f0d281e Add Makefile 2023-01-02 20:03:31 +01:00