fix: add dynamic config to pages and update Dockerfile for PostgreSQL

This commit is contained in:
2026-03-31 04:17:16 -07:00
parent f0073d1e23
commit 1e5f900821
11 changed files with 38 additions and 43 deletions
+6 -34
View File
@@ -1,6 +1,9 @@
# CasaOS Optimized Docker Compose Configuration
# This file is optimized for deployment on CasaOS
# Usage: docker-compose -f docker-compose.casaos.yml up -d
#
# IMPORTANT: This configuration requires an external PostgreSQL database.
# Set DATABASE_URL environment variable to your PostgreSQL connection string.
services:
app:
@@ -11,13 +14,12 @@ services:
ports:
- "3000:3000"
environment:
# Database Configuration
# Database Configuration (REQUIRED: Set via CasaOS environment variables)
- DATABASE_PROVIDER=postgresql
- DATABASE_URL=postgresql://euchre_camp:euchrepassword@postgresql:5432/euchre_camp
- DATABASE_SHADOW_URL=postgresql://euchre_camp:euchrepassword@postgresql:5432/euchre_camp_shadow
- DATABASE_URL=${DATABASE_URL:-postgresql://euchre_camp:password@your-postgres-host:5432/euchre_camp}
- DATABASE_SHADOW_URL=${DATABASE_SHADOW_URL:-postgresql://euchre_camp:password@your-postgres-host: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}
@@ -25,13 +27,8 @@ services:
- 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:
postgresql:
condition: service_healthy
volumes:
# Persist uploaded files and static content
- euchre_camp_app_data:/app/public/uploads
@@ -41,32 +38,7 @@ services:
networks:
- euchre-network
postgresql:
image: postgres:15-alpine
container_name: euchre-camp-postgres
environment:
- POSTGRES_DB=euchre_camp
- POSTGRES_USER=euchre_camp
# 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_camp -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