Skip to content

feat: add Docker setup for the backend and local development - #19

Merged
pitercoding merged 1 commit into
mainfrom
feat/docker-setup
Nov 27, 2026
Merged

pitercoding merged 1 commit into
mainfrom
feat/docker-setup

Conversation

@pitercoding

Copy link
Copy Markdown
Owner

Summary

  • Adds a Dockerfile for the backend, a docker-compose file for local development and a CI job that builds the image.

Motivation

  • The backend will be deployed on Render, which needs a Docker image for Java.
  • A compose file makes the local database a one-command setup.

Implementation

  • backend/Dockerfile: multi-stage build (JDK 21 to build, JRE 21 Alpine to run), non-root user, PORT support, health check.
  • backend/.dockerignore.
  • docker-compose.yml: PostgreSQL 16 (host port 5433) and an optional full profile that also runs the backend. Naming follows the other projects (worklog-postgres, worklog-backend, worklog-postgres-data).
  • New docker job in the CI workflow that builds the image.

Testing

  • Built the image and ran the full stack with Docker Compose: migrations, health check, API and CORS work.
  • Started the image with PORT=10000 and the prod profile, as Render does.
  • Validated the workflow with actionlint.

@pitercoding
pitercoding merged commit fa320f5 into main Nov 27, 2026
3 checks passed
@pitercoding
pitercoding deleted the feat/docker-setup branch November 27, 2026 16:02
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