Skip to content

deploy: replace stub docker-compose with working VPS stack#1

Open
replicas-connector[bot] wants to merge 2 commits into
distfrom
nomad/fix-vps-deploy-compose
Open

deploy: replace stub docker-compose with working VPS stack#1
replicas-connector[bot] wants to merge 2 commits into
distfrom
nomad/fix-vps-deploy-compose

Conversation

@replicas-connector

Copy link
Copy Markdown

Summary

  • deploy/docker-compose.yml on dist was a one-line stub: file:///tmp/b2_freescout_compose.txt. It cannot deploy anything.
  • Replace it with a real, production-shaped FreeScout + MariaDB compose stack so Nomad can stand up FreeScout on a fresh VPS.
  • Add deploy/.env.example (passwords, APP_URL, SMTP) and deploy/README.md with a 4-step bring-up.

What's in the stack

  • App: tiredofit/freescout (tag pinned via FREESCOUT_IMAGE_TAG), bound to APP_PORT for an upstream reverse proxy (Caddy/nginx/Traefik) to terminate TLS.
  • DB: mariadb:10.11 with a healthcheck; app waits for service_healthy before starting.
  • Persistence: named volumes freescout_data, freescout_logs, freescout_db.
  • Config: every secret and URL is sourced from deploy/.env — nothing baked into the compose file.

Test plan

  • docker compose -f deploy/docker-compose.yml --env-file deploy/.env.example config -q validates cleanly (no warnings).
  • On the target VPS: cp deploy/.env.example deploy/.env, fill in real values, docker compose ... up -d, then complete the FreeScout web installer at APP_URL.
  • Confirm reverse proxy forwards :443APP_PORT.
  • Send a test outbound email via Manage → System → Mail Settings to verify SMTP creds.

Created by Jaden (jadengarza@pm.me) with Replicas
Workspace  ·  Slack Thread

The previous deploy/docker-compose.yml was a one-line stub pointing at
file:///tmp/b2_freescout_compose.txt and could not be used to deploy
anything. Replace it with a real production-shaped compose file plus an
env template and a short README so Nomad can stand up FreeScout on a
fresh VPS.

- App container uses tiredofit/freescout (the widely used community image)
- MariaDB 10.11 sidecar with healthcheck, named volumes for persistence
- All secrets/URLs sourced from deploy/.env (template provided)
- Bound to APP_PORT for an external reverse proxy to terminate TLS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: itsablabla <itsablabla@users.noreply.github.com>
@capy-ai

capy-ai Bot commented May 27, 2026

Copy link
Copy Markdown

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

The previous compose used legacy `tiredofit/freescout` env vars
(`SMTP_HOST`, `ENABLE_SMTP`, `DISPLAY_ERRORS`, `CONTAINER_ENABLE_MONITORING`,
`SITE_URL`) and mounted `/www/html` for persistence. As of the May 2026
rebrand the canonical image is `nfrastack/freescout`, mail config moved to
the `FREESCOUT_MAIL_*` prefix, and persistent state lives at `/data`
(sessions, cache, modules, generated config). Without `/data` mounted the
container loses state across restarts; without the new mail vars SMTP
silently does not get written into FreeScout's `.env`.

- switch image to `nfrastack/freescout`
- mount `/data` (state) and `/logs` (logs); drop the source-tree mount
- use `APP_URL` (canonical) instead of `SITE_URL` (legacy alias)
- set `DB_TYPE=mariadb` so the entrypoint writes the right driver
- move SMTP to `FREESCOUT_MAIL_*` and expose `SMTP_ENCRYPTION`
- swap the curl-based healthcheck for a bash TCP probe (curl is not
  guaranteed to be present in the alpine base) and lift `start_period`
  so the first-boot schema migration has room to finish

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: itsablabla <itsablabla@users.noreply.github.com>
@replicas-connector

Copy link
Copy Markdown
Author

Pushed 4e66259 to fix several latent problems that would've made this stack fail to actually serve FreeScout once docker compose up returned:

Why the original stack didn't work

The tiredofit/freescout image was rebranded to nfrastack/freescout in May 2026. The DockerHub tag still publishes, but it's the new image — and the new image broke compatibility with the env var names and volume layout this compose was built around:

What we had Why it broke Fix
freescout_data:/www/html only State (sessions, cache, installed modules, generated .env) lives at /data in the new image; /www/html is now optional and gets clobbered on every container start by ENABLE_AUTO_UPDATE Mount freescout_data:/data (+ freescout_logs:/logs)
ENABLE_SMTP / SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASS / SMTP_FROM_ADDRESS Removed in the new image — mail vars must use the FREESCOUT_ passthrough prefix Switch to FREESCOUT_MAIL_HOST, FREESCOUT_MAIL_PORT, FREESCOUT_MAIL_USERNAME, FREESCOUT_MAIL_PASSWORD, FREESCOUT_MAIL_FROM_ADDRESS, FREESCOUT_MAIL_FROM_NAME, FREESCOUT_MAIL_ENCRYPTION
SITE_URL Legacy alias; canonical is now APP_URL Use APP_URL
DISPLAY_ERRORS, CONTAINER_ENABLE_MONITORING, VIRTUAL_HOST Dead vars on the new image Removed
healthcheck: curl -fsS http://localhost/ The new alpine-based image doesn't ship curl by default — the healthcheck would always report unhealthy and the depends_on: service_healthy chain would stall Use a bash TCP probe (exec 3<>/dev/tcp/127.0.0.1/80) and lift start_period to 120s for first-boot schema migration
(missing) DB_TYPE Defaults to mysql; with a MariaDB server attached this still works but the entrypoint logs warnings and the wrong driver lands in .env Set DB_TYPE=mariadb

Also:

  • Updated deploy/.env.example to match the new var names + added SMTP_ENCRYPTION (defaults to tls).
  • Updated deploy/README.md to point at the canonical image + document the FREESCOUT_* prefix for adding any other FreeScout .env setting.

docker compose -f deploy/docker-compose.yml --env-file deploy/.env.example config -q still validates cleanly.

The unrelated Continuous AI: New Dev Agent check on this PR failed on the previous commit with no diagnostics surfaced through the GitHub API — it doesn't appear to gate anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant