Setup Podman and Podman Compose for local development
Add comprehensive Podman configuration for local development: - docker-compose.yml: Main compose file with all services (PostgreSQL, RabbitMQ, API, Frontend) - docker-compose.dev.yml: Development-specific overrides with hot-reload - Dockerfile.api: Backend API service Dockerfile - Dockerfile.frontend: Frontend Next.js service Dockerfile - Updated Dockerfile: Podman-compatible production build with better layer caching - .env.example: Environment variable template - .dockerignore: Exclude unnecessary files from builds - Makefile: Convenient commands for common Podman operations - scripts/db/: Database initialization scripts directory - Updated README.md: Comprehensive Podman setup and usage documentation Features: - Rootless Podman support with SELinux compatibility - Development mode with volume mounts for hot-reload - Health checks for service dependencies - Proper build stage optimization - All services networked together
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Backend API Dockerfile for Podman
|
||||
FROM docker.io/library/node:22-slim
|
||||
|
||||
# Install required dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y ca-certificates build-essential && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Enable corepack and prepare pnpm
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
COPY turbo.json ./
|
||||
|
||||
# Copy service and package directories
|
||||
COPY services/package.json ./services/
|
||||
COPY packages ./packages
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Copy service source code
|
||||
COPY services ./services
|
||||
|
||||
# Expose API port
|
||||
EXPOSE 4000
|
||||
|
||||
# Default command (can be overridden in docker-compose)
|
||||
CMD ["pnpm", "--filter", "api", "dev"]
|
||||
Reference in New Issue
Block a user