From a69d7042840f8f887d8bd30aeca373ad769ab80d Mon Sep 17 00:00:00 2001 From: Ryan Chen Date: Mon, 12 Jan 2026 21:44:30 -0500 Subject: [PATCH] asdf --- .env.example | 4 ++++ .env.production.example | 4 ++++ Caddyfile.example | 2 +- DEPLOY.md | 2 ++ README.production.md | 2 +- docker-compose.production.yml | 1 + 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index a30b05e..fa15dad 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,10 @@ # Flask app location (required for database migrations) FLASK_APP=backend.app:create_app +# Flask secret key (optional in development, REQUIRED in production) +# Generate with: python3 -c "import secrets; print(secrets.token_hex(32))" +# SECRET_KEY=your-secret-key-here + # Authelia OIDC Configuration # REQUIRED: Set these values to match your Authelia instance diff --git a/.env.production.example b/.env.production.example index 8a0c015..1a21cc9 100644 --- a/.env.production.example +++ b/.env.production.example @@ -4,6 +4,10 @@ # Flask app location FLASK_APP=backend.app:create_app +# Flask secret key (REQUIRED for production) +# Generate with: python3 -c "import secrets; print(secrets.token_hex(32))" +SECRET_KEY=CHANGE_ME_TO_A_RANDOM_SECRET_KEY + # Backend port (defaults to 5001 if not set) PORT=5001 diff --git a/Caddyfile.example b/Caddyfile.example index ecb2c2e..a780108 100644 --- a/Caddyfile.example +++ b/Caddyfile.example @@ -3,7 +3,7 @@ # Basic configuration - Caddy handles SSL automatically trivia.torrtle.co { - # Reverse proxy to Flask app + # Reverse proxy to Flask app (use localhost:5001, not :5001) reverse_proxy localhost:5001 # Increase client upload size for images (default is 10MB) diff --git a/DEPLOY.md b/DEPLOY.md index 2c63964..8d98da0 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -57,6 +57,8 @@ trivia.torrtle.co { } EOF +# IMPORTANT: Use localhost:5001, not just :5001 + # Start Caddy sudo systemctl restart caddy ``` diff --git a/README.production.md b/README.production.md index 4f94ab6..c825786 100644 --- a/README.production.md +++ b/README.production.md @@ -99,7 +99,7 @@ sudo systemctl status caddy **Simple Caddyfile (minimal):** ```caddy trivia.torrtle.co { - reverse_proxy localhost:5001 + reverse_proxy localhost:5001 # Important: use localhost:5001, not :5001 } ``` diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 8e64ba8..86e5081 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -22,6 +22,7 @@ services: environment: - FLASK_APP=backend.app:create_app - FLASK_ENV=production + - SECRET_KEY=${SECRET_KEY} - PORT=5001 - DATABASE_URI=sqlite:////app/backend/instance/trivia.db - CORS_ORIGINS=${CORS_ORIGINS:-*}