Containerize dev: adopt dunglas/symfony-docker + Postgres + Vite frontend service #28

Closed
opened 2026-06-14 23:38:35 +02:00 by myrmidex · 1 comment
Owner

Set up the dev container stack on the new architecture.

  • Adopt dunglas/symfony-docker as the base (root compose.yaml + Dockerfile + Caddyfile + entrypoint). Skip the FrankenPHP-runtime step (built into Symfony 8.1).
  • Reconcile with Podman/podman-compose — the risk to validate first: rootless user/permission mapping (PODMAN_USERNS=keep-id, USER_ID/GROUP_ID), volume ownership (vendor/, var/), entrypoint chown behaviour. Get the bare Symfony container running under Podman before adding the frontend (de-risk the spike).
  • Postgres 16 service (matches .env: buckets/buckets).
  • Add frontend/ Vite web service (Node 22, HMR) in compose.override.yaml (dev-only).
  • Caddy: /api/* → Symfony, everything else → frontend; SPA fallback to index.html.
  • Vite dev-server proxies /api → backend (same-origin in dev → no CORS, cookie auth works identically dev/prod).
  • Update shell.nix: psql client (drop mariadb.client), point dev-* wrappers at root compose.yaml.
  • Ports: api 8100, web 5174, db 5433.

Exit: dev-up brings api+web+db; app reachable; HMR works under Podman.

Set up the dev container stack on the new architecture. - Adopt `dunglas/symfony-docker` as the base (root `compose.yaml` + Dockerfile + Caddyfile + entrypoint). Skip the FrankenPHP-runtime step (built into Symfony 8.1). - Reconcile with **Podman/podman-compose** — the risk to validate first: rootless user/permission mapping (`PODMAN_USERNS=keep-id`, USER_ID/GROUP_ID), volume ownership (vendor/, var/), entrypoint chown behaviour. Get the bare Symfony container running under Podman *before* adding the frontend (de-risk the spike). - Postgres 16 service (matches `.env`: buckets/buckets). - Add `frontend/` Vite `web` service (Node 22, HMR) in `compose.override.yaml` (dev-only). - Caddy: `/api/*` → Symfony, everything else → frontend; SPA fallback to index.html. - Vite dev-server proxies `/api` → backend (same-origin in dev → no CORS, cookie auth works identically dev/prod). - Update `shell.nix`: psql client (drop mariadb.client), point `dev-*` wrappers at root `compose.yaml`. - Ports: api 8100, web 5174, db 5433. Exit: `dev-up` brings api+web+db; app reachable; HMR works under Podman.
myrmidex added this to the v0.3.0 milestone 2026-06-14 23:38:35 +02:00
myrmidex added the
enhancement
label 2026-06-14 23:38:35 +02:00
myrmidex self-assigned this 2026-06-14 23:38:35 +02:00
Author
Owner

Done. Backend dev container stack is up on rootless Podman:

  • dunglas/symfony-docker base (Dockerfile pinned to php8.4), Mercure left intact.
  • Postgres 16 database service; app serves on http://localhost:8100 (HTTP-only dev via SERVER_NAME: ":80").
  • Ports declared per-env (dev override = 8100 only; prod = 443). DB on 5433.
  • Fixed: missing pdo_pgsql extension (symfony-docker omits it; Docker recipe was declined), HTTP→HTTPS redirect, podman-compose name: ports friction.
  • Podman verdict: no Podman-specific incompatibilities — networking/DNS, volume perms, healthchecks, worker mode all worked.

Scope change: the frontend Vite web service is deferred to #33 (Scaffold React/Vite SPA) — there's no frontend/ to serve until then. The backend containerization (the real spike) is complete, so closing this.

Done. Backend dev container stack is up on rootless Podman: - `dunglas/symfony-docker` base (Dockerfile pinned to php8.4), Mercure left intact. - Postgres 16 `database` service; app serves on http://localhost:8100 (HTTP-only dev via `SERVER_NAME: ":80"`). - Ports declared per-env (dev override = 8100 only; prod = 443). DB on 5433. - Fixed: missing `pdo_pgsql` extension (symfony-docker omits it; Docker recipe was declined), HTTP→HTTPS redirect, podman-compose `name:` ports friction. - Podman verdict: no Podman-specific incompatibilities — networking/DNS, volume perms, healthchecks, worker mode all worked. **Scope change:** the frontend Vite `web` service is deferred to #33 (Scaffold React/Vite SPA) — there's no `frontend/` to serve until then. The backend containerization (the real spike) is complete, so closing this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/buckets#28
No description provided.