Skip to content

Dockerfile and docker-compose for API + Postgres + Redis #14

@tayebmokni

Description

@tayebmokni

Summary

Provide multi-stage Dockerfile for the Go API server and a Docker Compose file that brings up the server, Postgres 15, and Redis for local development. This unblocks local testing of every downstream migration / handler issue.

Design reference

  • docs/00-architecture-overview.md §2 (Stack Decisions)

Acceptance criteria

  • Dockerfile builds a minimal image (distroless or scratch) under 50 MB
  • Multi-stage build: deps cache layer, build layer, runtime layer
  • docker-compose.yml defines services: api, postgres:15, redis:7
  • Compose mounts a named volume for Postgres data
  • docker compose up from a fresh clone produces a healthy API responding to /healthz
  • Compose includes migrate service or run-once job that applies migrations on boot
  • Image runs as non-root user

Dependencies

#2, #5

Complexity

S

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:devopsDeployment, K8s, CIphase:P0-skeletonPhase 0 — Skeletonpriority:P0Critical — blocks the phaseskill:devopsDocker, K8s, CI/CDtype:featNew feature or implementation task

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions