Files
headroom/docker-compose.yml
Santhosh Janardhanan 493cb78173 feat(layout): finalize p01 and p02 changes
Complete UI foundation and app layout implementation, stabilize container health checks, and archive both OpenSpec changes after verification.
2026-02-18 16:12:11 -05:00

103 lines
2.2 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:latest
container_name: headroom-postgres
restart: unless-stopped
environment:
POSTGRES_DB: headroom
POSTGRES_USER: headroom
POSTGRES_PASSWORD: ${DB_PASSWORD:-headroom_secret}
volumes:
- ./data/postgres:/var/lib/postgresql
ports:
- "5432:5432"
networks:
- headroom-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U headroom"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:alpine
container_name: headroom-redis
restart: unless-stopped
volumes:
- ./data/redis:/data
ports:
- "6379:6379"
networks:
- headroom-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Laravel Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: headroom-backend
restart: unless-stopped
working_dir: /var/www/html
volumes:
- ./backend:/var/www/html
- /var/www/html/vendor
ports:
- "3000:3000"
environment:
- APP_ENV=local
- APP_DEBUG=true
- DB_CONNECTION=pgsql
- DB_HOST=postgres
- DB_PORT=5432
- DB_DATABASE=headroom
- DB_USERNAME=headroom
- DB_PASSWORD=${DB_PASSWORD:-headroom_secret}
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-null}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- headroom-network
# SvelteKit Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: headroom-frontend
restart: unless-stopped
working_dir: /app
volumes:
- /app/node_modules
ports:
- "5173:5173"
environment:
- NODE_ENV=development
- PORT=5173
- VITE_API_URL=http://localhost:3000/api
depends_on:
- backend
networks:
- headroom-network
networks:
headroom-network:
driver: bridge
volumes:
postgres_data:
redis_data: