Refactor production setup and database management
- Updated Dockerfile for production to ensure proper database permissions and improved startup script. - Removed outdated PRODUCTION_README.md and consolidated relevant information into other documentation. - Enhanced deploy.sh script to fix database permissions and streamline deployment process. - Modified docker-compose configuration to use a dedicated production file and adjusted port mappings. - Removed legacy docker-compose.yml file to avoid confusion. - Improved session management by refining secure cookie settings based on environment variables. - Deleted obsolete Nginx configuration and old seed scripts to clean up the project structure. - Updated database setup scripts to reflect new structure and removed old seed data scripts. - Adjusted reset-db script to use environment variable for database path. - Enhanced setup-database script to provide dynamic admin credentials in the summary. - Removed unnecessary backup file for SQLite database.
This commit is contained in:
+30
-11
@@ -1,14 +1,33 @@
|
||||
# Database
|
||||
DATABASE_URL="./sqlite.db"
|
||||
# Environment Configuration Template
|
||||
# Copy this to .env.production and fill in your values
|
||||
|
||||
# NextAuth.js
|
||||
NEXTAUTH_URL="http://localhost:3000"
|
||||
NEXTAUTH_SECRET="your-secret-key-here-make-this-very-long-and-random"
|
||||
# === REQUIRED VARIABLES ===
|
||||
# Database URL (host path - gets mounted into container)
|
||||
DATABASE_URL=./data/sqlite.db
|
||||
|
||||
# Email Configuration (Gmail)
|
||||
EMAIL_USER="your-email@gmail.com"
|
||||
EMAIL_PASSWORD="your-app-password-here"
|
||||
# NextAuth.js Configuration (REQUIRED)
|
||||
NEXTAUTH_URL=https://your-domain.com
|
||||
NEXTAUTH_SECRET=your-long-random-secret-here-generate-with-openssl-rand-base64-32
|
||||
|
||||
# Admin Configuration
|
||||
ADMIN_EMAIL="admin@example.com"
|
||||
ADMIN_PASSWORD="admin123"
|
||||
# Admin User (CHANGE THESE!)
|
||||
ADMIN_EMAIL=admin@your-domain.com
|
||||
ADMIN_PASSWORD=your-secure-admin-password
|
||||
|
||||
# === OPTIONAL VARIABLES ===
|
||||
# Application Environment
|
||||
NODE_ENV=production
|
||||
PORT=3000
|
||||
|
||||
# Email Configuration (for notifications - optional)
|
||||
EMAIL_USER=your-email@gmail.com
|
||||
EMAIL_PASSWORD=your-gmail-app-password
|
||||
|
||||
# Rate Limiting (defaults provided)
|
||||
RATE_LIMIT_MAX=100
|
||||
RATE_LIMIT_WINDOW=900000
|
||||
|
||||
# Logging Level
|
||||
LOG_LEVEL=info
|
||||
|
||||
# Local Development Override (for HTTP testing)
|
||||
DISABLE_SECURE_COOKIES=false
|
||||
|
||||
Reference in New Issue
Block a user