fix: configure PostgreSQL for production and clean up deployment

- Fix database configuration to use PostgreSQL in production
- Add knexfile.js to support both SQLite (dev) and PostgreSQL (prod)
- Create admin user creation script (scripts/create-admin.js)
- Clean up docker-compose files:
  - Remove redundant docker-compose.yml and docker-compose.local.yml
  - Create docker-compose.dev.yml for development
  - Update docker-compose.prod.yml with proper DB configuration
- Clean up environment files:
  - Update .env.example for development
  - Update .env.production.example with proper settings
  - Remove redundant .env.local
- Update backend .env.example with database configuration options
- Create comprehensive DEPLOYMENT.md with admin setup instructions
- Fix production database name consistency (picpeak instead of photoapp)
This commit is contained in:
2025-07-13 21:24:07 +02:00
parent 66940c2f5b
commit 1c7fa781ad
11 changed files with 577 additions and 691 deletions
+10 -1
View File
@@ -24,10 +24,19 @@ ARCHIVE_PATH=./storage/events/archived
# Logging
LOG_LEVEL=info
# Database (for production, consider PostgreSQL)
# Database Configuration
# Development: Use SQLite
DATABASE_CLIENT=sqlite3
DATABASE_PATH=./data/photo_sharing.db
# Production: Use PostgreSQL
# DATABASE_CLIENT=pg
# DB_HOST=localhost
# DB_PORT=5432
# DB_USER=picpeak
# DB_PASSWORD=your-secure-password
# DB_NAME=picpeak
# Umami Analytics (optional)
UMAMI_URL=
UMAMI_WEBSITE_ID=