feat: Update Docker configuration and production environment settings for improved deployment

This commit is contained in:
MaddoScientisto 2026-04-20 21:43:15 +02:00
commit b45eac8055
3 changed files with 11 additions and 7 deletions

View file

@ -2,7 +2,7 @@ Running and debugging with Docker or local Couchbase Lite storage
Quick run (Docker Engine required):
1. Build and start services:
1. Build and start services with the development override:
docker compose up --build
@ -11,9 +11,15 @@ Quick run (Docker Engine required):
Production deployment:
- Put deployment values in a `.env` file next to `docker-compose.yml` or export them in the shell before running Docker Compose.
- The base compose file is runtime-only and expects the image referenced by `IMAGE_REGISTRY` and `IMAGE_TAG` to already exist.
- The base compose file is now parameterized for host port, persisted storage path, image tag, auth mode, seeded user credentials, allowed hosts, and healthcheck timings.
- For a direct production deployment, define at least `WORKTRACKER_DATA_PATH`. If you enable the built-in login flow, also define `APPAUTH_ENABLED=true` and a strong `SINGLEUSER_PASSWORD` before first startup.
Production start:
- Copy `docker-compose.yml` and the matching env file to the server.
- Pull the published image first, then start the stack with `docker compose --env-file production.env up -d`.
Deployment variables:
| Variable | Required for production | Default | Purpose |
@ -104,5 +110,6 @@ Docker Playwright smoke tests:
Notes:
- The base compose file remains production-oriented; the override file is the optional containerized development layer.
- `docker compose up --build` still works locally because Docker Compose auto-loads `docker-compose.override.yml`, which carries the build settings.
- The first container build takes longer because the dev image installs the .NET debugger.
- The Dockerfile uses the .NET 10 `*-noble` images so local builds and container builds stay aligned with the SDK available in VS Code.

View file

@ -1,8 +1,5 @@
services:
worktracker:
build:
context: .
dockerfile: Dockerfile
image: ${IMAGE_REGISTRY:-worktracker}:${IMAGE_TAG:-latest}
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}

View file

@ -10,10 +10,10 @@ WORKTRACKER_DATA_PATH=/mnt/storage/data/worktracker/db
COUCHBASELITE_DATABASE_NAME=worktracker
# Published app port
WORKTRACKER_PORT=8002
WORKTRACKER_PORT=8003
# Image reference used by Docker Compose
IMAGE_REGISTRY=worktracker
IMAGE_REGISTRY=forgejo.maddoscientisto.net/maddo/worktracker
IMAGE_TAG=latest
# Built-in authentication
@ -22,7 +22,7 @@ APPAUTH_DEFAULT_USERNAME=Admin
APPAUTH_DEFAULT_USERID=ADMIN
SINGLEUSER_SEED_ON_STARTUP=true
SINGLEUSER_USERNAME=admin
SINGLEUSER_PASSWORD=disagio-spaghetti-science-adsfg
SINGLEUSER_PASSWORD=disagio
# Container healthcheck tuning
WORKTRACKER_HEALTHCHECK_INTERVAL=30s