Files
ai-recruit-site-template/docker-compose.yml
Mikael Westöö a44f8e18d7 Remove volume mount for public directory - files built into image
The volume mount was overwriting the public directory from the Docker
image with an empty directory from the host, causing ENOENT errors.
Public files are now served from the Docker image via COPY command.
2026-01-23 21:59:41 +01:00

53 lines
1.2 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: recruitment-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME:-recruitment}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme123}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- recruitment-network
app:
build: .
container_name: recruitment-app
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
environment:
NODE_ENV: production
PORT: 3000
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${DB_NAME:-recruitment}
DB_USER: ${DB_USER:-postgres}
DB_PASSWORD: ${DB_PASSWORD:-changeme123}
SESSION_SECRET: ${SESSION_SECRET:-change-this-secret-in-production}
depends_on:
postgres:
condition: service_healthy
networks:
- recruitment-network
volumes:
postgres_data:
driver: local
networks:
recruitment-network:
driver: bridge