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
+22 -9
View File
@@ -31,6 +31,9 @@ POSTGRES_PASSWORD=$(openssl rand -base64 16 | tr -d '\n')
echo "✅ Generated BETTER_AUTH_SECRET: $BETTER_AUTH_SECRET"
echo "✅ Generated POSTGRES_PASSWORD: $POSTGRES_PASSWORD"
echo ""
echo "⚠️ NOTE: The POSTGRES_PASSWORD is for reference only."
echo " You must provide your own PostgreSQL connection string via DATABASE_URL."
echo ""
# Create .env file if it doesn't exist
if [ ! -f .env ]; then
@@ -40,9 +43,10 @@ if [ ! -f .env ]; then
# Generated by setup-casaos.sh
# Database Configuration
# IMPORTANT: Update these with your actual PostgreSQL connection details!
DATABASE_PROVIDER=postgresql
DATABASE_URL=postgresql://euchre_camp:${POSTGRES_PASSWORD}@postgresql:5432/euchre_camp
DATABASE_SHADOW_URL=postgresql://euchre_camp:${POSTGRES_PASSWORD}@postgresql:5432/euchre_camp_shadow
DATABASE_URL=postgresql://euchre_camp:${POSTGRES_PASSWORD}@your-postgres-host:5432/euchre_camp
DATABASE_SHADOW_URL=postgresql://euchre_camp:${POSTGRES_PASSWORD}@your-postgres-host:5432/euchre_camp_shadow
# Better Auth Configuration
BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}
@@ -65,17 +69,26 @@ echo "Setup Complete!"
echo "=========================================="
echo ""
echo "Next steps for CasaOS deployment:"
echo "1. Build the Docker image:"
echo ""
echo "1. Set up your PostgreSQL database (external)"
echo " - Create database 'euchre_camp'"
echo " - Create user 'euchre_camp' with password"
echo " - Grant all privileges on euchre_camp database"
echo ""
echo "2. Configure CasaOS environment variables:"
echo " - DATABASE_URL: postgresql://user:pass@host:5432/euchre_camp"
echo " - BETTER_AUTH_SECRET: (generated above)"
echo " - BETTER_AUTH_URL: http://your-casaos-ip:3000"
echo " - TRUSTED_ORIGINS: http://your-casaos-ip:3000"
echo ""
echo "3. Build the Docker image:"
echo " docker-compose -f docker-compose.casaos.yml build"
echo ""
echo "2. Start the application:"
echo "4. Start the application:"
echo " docker-compose -f docker-compose.casaos.yml up -d"
echo ""
echo "3. Access the application at http://localhost:3000"
echo "5. Access the application at http://your-casaos-ip:3000"
echo ""
echo "4. Create admin user:"
echo "6. Create admin user:"
echo " docker exec -it euchre-camp node scripts/create-admin-via-api.js"
echo ""
echo "Important: Update BETTER_AUTH_URL and TRUSTED_ORIGINS in .env"
echo "with your CasaOS server's IP address or hostname!"
echo ""