1.4 KiB
1.4 KiB
Deploy a Docker service
Status: draft process; adjust to actual Compose layout on freighter.
- Create or update the service's Compose project in its source repository. Use pinned image versions where practical. Put secrets in the host's secret mechanism, outside Git.
- Define persistent volumes, UID/GID, restart policy, resource needs, and health check. Existing workloads have used UID/GID
1005:1005; confirm this for the new image and its mounts. - Attach the appropriate existing Docker network (
homestackorhomenet); verify which network Traefik actually shares. Expose only necessary ports. - Add Traefik labels for host, entrypoint, TLS resolver, middleware, and correct internal service port. Verify the container and Traefik share a network; specify
traefik.docker.networkwhen ambiguous. - Validate Compose (
docker compose config), then deploy (docker compose up -d) from the intended project directory. Checkdocker compose ps, health, and logs. - Test direct container access, then local FQDN through Traefik, then external access only if intended. A Traefik 404 suggests route discovery/rule mismatch; a gateway error suggests backend/network/port issues.
- Add monitoring, backups, and an entry in the service inventory. Record rollback image tag and volume restore method before a major upgrade.
Do not copy a real credential, API token, or Cloudflare DNS credential into Compose tracked by Git.