diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-01-26 16:49:44 -1000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-01-26 16:49:44 -1000 |
| commit | 42a4e32daca13b518e64e5821080ff3d6adf0e39 (patch) | |
| tree | 639c790e25b961ecf51ab6ea75206bc3432f1548 /issues/task_003_deployment_prep.md | |
| parent | 8de1b5cb8915ed9a6e32566431d05fafafeb338d (diff) | |
Use configured timezone throughout codebase
- Add config/timezone.go with timezone utilities:
- SetDisplayTimezone(), GetDisplayTimezone()
- Now(), Today() - current time/date in display TZ
- ParseDateInDisplayTZ(), ToDisplayTZ() - parsing helpers
- Initialize timezone at startup in main.go
- Update all datetime logic to use configured timezone:
- handlers/handlers.go - all time.Now() calls
- handlers/timeline.go - date parsing
- handlers/timeline_logic.go - now calculation
- models/atom.go - ComputeUIFields()
- models/timeline.go - ComputeDaySection()
- api/plantoeat.go - meal date parsing
- api/todoist.go - due date parsing
- api/trello.go - due date parsing
This ensures all dates/times display correctly regardless
of server timezone setting.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'issues/task_003_deployment_prep.md')
| -rw-r--r-- | issues/task_003_deployment_prep.md | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/issues/task_003_deployment_prep.md b/issues/task_003_deployment_prep.md deleted file mode 100644 index a05c2eb..0000000 --- a/issues/task_003_deployment_prep.md +++ /dev/null @@ -1,58 +0,0 @@ -# Task 003: VPS Deployment Preparation (Apache + Systemd) - -Prepare the application for deployment on a VPS using Apache2 as a reverse proxy and Systemd for process management. - -## Target Environment -- **OS:** Linux (VPS) -- **Web Server:** Apache2 -- **Process Manager:** Systemd -- **Directory Structure:** - - Root: `/site/{fqdn}/` - - Binary: `/site/{fqdn}/app` - - Data: `/site/{fqdn}/data/` (Database location) - - Webroot: `/site/{fqdn}/public/` (Static assets) - -## Plan - -### 1. Configuration Updates -- Ensure the application can accept configuration via Environment Variables for: - - `PORT` (Default: 8080) - - `DB_PATH` (Default: `./task.db`, Target: `/site/{fqdn}/data/dashboard.db`) - - `SESSION_KEY` (Secret) - - `STATIC_DIR` (Optional: if we want to point to `public` explicitly) - -### 2. Create Deployment Artifacts -Create a `deployment/` directory containing: - -#### A. Systemd Unit File (`deployment/task-dashboard.service`) -- **Description:** Manages the Go application process. -- **Key Settings:** - - `ExecStart=/site/{fqdn}/app` - - `WorkingDirectory=/site/{fqdn}/` - - `User=www-data` (or specific user) - - `Restart=always` - - `EnvironmentFile=/site/{fqdn}/.env` (or inline env vars) - -#### B. Apache VHost Configuration (`deployment/apache.conf`) -- **Description:** Reverse proxy configuration. -- **Key Settings:** - - Based on provided template. - - `DocumentRoot /site/{fqdn}/public` - - `ProxyPass / http://localhost:8080/` - - `ProxyPassReverse / http://localhost:8080/` - - Serve static assets directly via Apache for performance (optional but recommended). - -### 3. Documentation -- Create `docs/deployment.md` with instructions: - 1. **Build:** `go build -o app cmd/dashboard/main.go` - 2. **Setup:** - - `mkdir -p /site/{fqdn}/{data,public}` - - Copy `app` to `/site/{fqdn}/` - - Copy `web/static` content to `/site/{fqdn}/public/` - - Copy `web/templates` to `/site/{fqdn}/templates` (or ensure app can find them) - 3. **Service:** Install and enable systemd service. - 4. **Apache:** Enable site and modules (`proxy`, `proxy_http`). - -## Considerations -- **Static Files:** We should decide if Apache serves `/static` directly from `/site/{fqdn}/public` or if the Go app handles it. Serving via Apache is preferred for performance. -- **Templates:** The Go app needs access to HTML templates. We need to ensure the `WorkingDirectory` allows relative path resolution to `web/templates` or configure an absolute path. |
