Skip to content

feat(infra): Set up PostgreSQL 17 as a Docker container #23

@ebouchut

Description

@ebouchut

Goal

Run a local PostgreSQL 17 instance using Podman for development and testing.

The backend (Spring Boot 3 / Java 21) requires PostgreSQL 15+.
We use Podman (not Docker) as the container runtime on macOS.

Tasks

  • Install Podman:
    brew install podman
    podman --version
  • Initialize and start the Podman machine:
    podman machine init && podman machine start
    podman run --rm quay.io/podman/hello
  • Pull the official PostgreSQL 17 image:
    podman pull docker.io/library/postgres:17
  • Create and start the container:
  podman run --name learn-dev-postgres \
    -e POSTGRES_USER=learndev \
    -e POSTGRES_PASSWORD=TODO \
    -e POSTGRES_DB=learndev \
    -p 5432:5432 \
    -d postgres:17
  • Verify the container is running:
    podman ps
  • Connect to the database and confirm access:
    podman exec -it learn-dev-postgres psql -U learndev -d learndev
  • Add the database credentials to your .env file
  • Document the setup in docs/ (prerequisites, commands, reset procedure)

Acceptance Criteria

  • podman ps shows the learn-dev-postgres container running
  • The Spring Boot app connects successfully using the configured datasource URL
  • No credentials are committed to the repository

References

Metadata

Metadata

Assignees

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions