chore: add CasaOS deployment configuration and documentation

This commit is contained in:
2026-03-31 03:56:50 -07:00
parent f49d0f02d9
commit 4c432f0971
3 changed files with 299 additions and 2 deletions
+75
View File
@@ -0,0 +1,75 @@
# CasaOS Optimized Docker Compose Configuration
# This file is optimized for deployment on CasaOS
# Usage: docker-compose -f docker-compose.casaos.yml up -d
services:
app:
build:
context: .
target: runner
container_name: euchre-camp
ports:
- "3000:3000"
environment:
# Database Configuration
- DATABASE_PROVIDER=postgresql
- DATABASE_URL=postgresql://euchre:euchrepassword@postgres:5432/euchre_camp
- DATABASE_SHADOW_URL=postgresql://euchre:euchrepassword@postgres:5432/euchre_camp_shadow
# Better Auth Configuration
# IMPORTANT: Set these via CasaOS environment variables!
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-change-this-secret-in-production}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
# Application Configuration
- NODE_ENV=production
# Trusted Origins for Better Auth
# IMPORTANT: Update this with your CasaOS IP/hostname
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
depends_on:
postgres:
condition: service_healthy
volumes:
# Persist uploaded files and static content
- euchre_camp_app_data:/app/public/uploads
restart: unless-stopped
networks:
- euchre-network
postgres:
image: postgres:15-alpine
container_name: euchre-camp-postgres
environment:
- POSTGRES_DB=euchre_camp
- POSTGRES_USER=euchre
# IMPORTANT: Change this password in production!
- POSTGRES_PASSWORD=euchrepassword
ports:
- "5432:5432"
volumes:
- euchre_camp_postgres_data:/var/lib/postgresql/data
- ./scripts/init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U euchre -d euchre_camp"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
networks:
- euchre-network
volumes:
euchre_camp_postgres_data:
driver: local
euchre_camp_app_data:
driver: local
networks:
euchre-network:
driver: bridge