70 lines
1.7 KiB
YAML
70 lines
1.7 KiB
YAML
version: "3.8"
|
|
|
|
# Development: hot-reload server + Vite dev server
|
|
# Usage: podman compose -f compose.dev.yml up
|
|
# PostgreSQL: podman compose -f compose.dev.yml --profile postgres up
|
|
|
|
services:
|
|
valkey:
|
|
image: valkey/valkey:8-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
# Uncomment when testing postgres
|
|
# postgres:
|
|
# image: pgautoupgrade/pgautoupgrade:18-alpine
|
|
# ports:
|
|
# - "5432:5432"
|
|
# environment:
|
|
# POSTGRES_DB: announcements
|
|
# POSTGRES_USER: announcements
|
|
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
|
|
# volumes:
|
|
# - postgres-data:/var/lib/postgresql
|
|
# healthcheck:
|
|
# test: ["CMD-SHELL", "pg_isready -U announcements"]
|
|
# interval: 5s
|
|
# timeout: 3s
|
|
# retries: 5
|
|
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: Containerfile.dev
|
|
depends_on:
|
|
valkey:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./server:/app/server # bind mount for hot reload
|
|
- app-data:/app/data
|
|
- app-hls:/app/hls
|
|
ports:
|
|
- "3000:3000"
|
|
- "7000:7000/udp"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- NODE_ENV=development
|
|
- REDIS_URL=redis://valkey:6379
|
|
# Uncomment when using DB_DRIVER=postgresql (also run with --profile postgres):
|
|
# - DATABASE_URL=postgresql://announcements:${POSTGRES_PASSWORD:-devpassword}@postgres:5432/announcements
|
|
|
|
client:
|
|
image: node:20-alpine
|
|
working_dir: /app
|
|
volumes:
|
|
- ./client:/app # bind mount for hot reload
|
|
ports:
|
|
- "5173:5173"
|
|
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
|
|
|
|
volumes:
|
|
postgres-data:
|
|
app-data:
|
|
app-hls:
|