infra: add Docker Compose setup for local development

- Configure PostgreSQL 18 and Valkey 9.1 services
- Create multi-stage Dockerfiles for API and Web apps
- Set up pnpm workspace support in container builds
- Configure hot reload via volume mounts for both services
- Add healthchecks for service orchestration
- Support dev/production stage targets (tsx watch vs compiled)
This commit is contained in:
lila 2026-03-25 18:56:04 +01:00
parent 671d542d2d
commit 2ebf0d0a83
13 changed files with 174 additions and 7 deletions

19
apps/web/Dockerfile Normal file
View file

@ -0,0 +1,19 @@
# 1. Base
FROM node:24-alpine AS base
RUN npm install -g pnpm
# 2. Deps
FROM base AS deps
WORKDIR /app
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
COPY apps/web/package.json ./apps/web/
COPY packages/shared/package.json ./packages/shared/
RUN pnpm install --frozen-lockfile
# 3. Dev
FROM base AS dev
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . ./
EXPOSE 5173
CMD ["pnpm", "--filter", "web", "dev", "--host"]