Skip to content

chore(deploy): dockerize the frontend and backend applications - #30

Merged
Zafar7645 merged 2 commits into
mainfrom
chore/11-dockerize-app
Aug 1, 2026
Merged

Zafar7645 merged 2 commits into
mainfrom
chore/11-dockerize-app

Conversation

@Zafar7645

Copy link
Copy Markdown
Owner

Summary

Dockerizes both the frontend and backend so the full stack (Postgres, backend, frontend) can be run with a single docker compose up, and updates project documentation to reflect the new workflow.

Type of Change

  • Bug fix
  • New feature
  • Refactor (no behaviour change)
  • Documentation
  • Chore (deps, tooling, CI)

Related Issue

Closes #11

Changes

  • Add apps/backend/Dockerfile: multi-stage build using nest build (webpack) to bundle all dependencies into a single dist/main.js, so the runtime image ships no node_modules and runs as the unprivileged node user
  • Add apps/frontend/Dockerfile: builds the Angular app and serves the static browser/ output via nginx
  • Add apps/frontend/nginx.conf.template, rendered from BACKEND_HOST/BACKEND_PORT at container start, proxying /api/* to the backend container
  • Add docker-compose.yml wiring db (Postgres 16, bound to 127.0.0.1 only), backend, and frontend services with healthchecks and startup ordering (depends_on: condition: service_healthy)
  • Add root .env.example for Docker Compose config (DB_USERNAME, DB_PASSWORD, DB_DATABASE, JWT_SECRET, BCRYPT_SALT_ROUNDS, ALLOWED_ORIGIN, and host port overrides DB_PORT/BACKEND_PORT/FRONTEND_PORT) — separate from apps/backend/.env used by the native workflow
  • Add .dockerignore
  • Bump apps/frontend/package.json and apps/frontend/src/environments/environment.production.ts for the containerized build
  • Update CLAUDE.md, README.md, docs/architecture/high-level-design.md, and docs/srs.md to document the Docker workflow alongside the existing native workflow
  • Update CHANGELOG.md under [Unreleased] with the new infrastructure additions

Testing

  • npm run lint passes with no errors
  • Backend unit tests pass (cd apps/backend && npm test)
  • Manually tested the affected flow end-to-end
  • Added or updated tests for new logic

Manual verification: docker compose up -d --build brings up db, backend, frontend in order (backend waits on Postgres healthcheck, frontend waits on backend healthcheck); registered/logged in through http://localhost:4200 and confirmed the Kanban board loads with /api/* correctly proxied to the backend container.

Screenshots

N/A — no UI change.

Notes for Reviewer

  • DB_USERNAME/DB_PASSWORD in .env only take effect the first time the pgdata volume is created; changing them later requires docker compose down -v, which drops the volume — called out in both .env.example and docker-compose.yml.
  • Postgres is bound to 127.0.0.1 only and is not reachable from outside the host.
  • This is additive: the existing native workflow (npm run start:backend / start:frontend against apps/backend/.env) is untouched.

@Zafar7645 Zafar7645 self-assigned this Aug 1, 2026
@Zafar7645 Zafar7645 added the chore label Aug 1, 2026
@Zafar7645 Zafar7645 changed the title Chore/11 dockerize app chore(deploy): dockerize the frontend and backend applications Aug 1, 2026
@Zafar7645
Zafar7645 merged commit e31ce19 into main Aug 1, 2026
4 checks passed
@Zafar7645
Zafar7645 deleted the chore/11-dockerize-app branch August 1, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

chore(deploy): Dockerize the frontend and backend applications

1 participant