This commit introduces environment configuration and Gitea OAuth authentication. - Added a `.env.sample` file for configuring server settings, database connection, authentication, and OAuth. This allows for easier customization and separation of configuration from code. - Implemented Gitea OAuth for user authentication. This provides a secure and convenient way for users to log in using their existing Gitea accounts. - Created a troubleshooting guide to help users resolve common issues, including authentication and server problems. This improves the overall user experience. - Added a debug controller and view to aid in development and troubleshooting. This provides developers with more tools to investigate issues. - Improved the user interface for login and registration. The changes include a cleaner design and clearer instructions. This enhances the user experience.
31 lines
776 B
Plaintext
31 lines
776 B
Plaintext
# Server Configuration
|
|
APP__SERVER__HOST=127.0.0.1
|
|
APP__SERVER__PORT=9999
|
|
APP__SERVER__WORKERS=4
|
|
|
|
# Templates Configuration
|
|
APP__TEMPLATES__DIR=./src/views
|
|
|
|
# Authentication
|
|
JWT_SECRET=your_jwt_secret_key_change_this_in_production
|
|
JWT_EXPIRATION_HOURS=24
|
|
# This must be at least 32 bytes long and should be a secure random string
|
|
SECRET_KEY=01234567890123456789012345678901
|
|
|
|
# OAuth Configuration - Gitea
|
|
GITEA_CLIENT_ID=your_client_id
|
|
GITEA_CLIENT_SECRET=your_client_secret
|
|
GITEA_INSTANCE_URL=https://your-gitea-instance.com
|
|
APP_URL=http://localhost:9999
|
|
|
|
# Database Configuration
|
|
APP__DATABASE__URL=postgres://user:password@localhost/hostbasket
|
|
APP__DATABASE__POOL_SIZE=5
|
|
|
|
# Logging
|
|
RUST_LOG=debug
|
|
|
|
# Application Environment
|
|
APP_ENV=development
|
|
APP_CONFIG=config/local.toml
|