diff --git a/README.md b/README.md index 2461b3c..2385741 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,10 @@ mockapi/ 4. **Configure environment variables**: ```bash cp example.env .env - # Edit .env with your settings + # Edit .env with your settings (see example.env for all available variables) ``` - Example `.env`: + Minimal `.env` example: ```ini DATABASE_URL=sqlite+aiosqlite:///./mockapi.db ADMIN_USERNAME=admin @@ -94,6 +94,8 @@ mockapi/ DEBUG=True # Set to False in production ``` + The `example.env` file includes additional configuration options for OAuth2, logging, and server settings. + 5. **Initialize the database** (tables are created automatically on first run). **For production deployment**, consider using the automated `install.sh` script which handles virtual environment creation, dependency installation, secure credential generation, and systemd service setup. See [Production Deployment with install.sh](#production-deployment-with-installsh) for details. diff --git a/example.env b/example.env index 0b96e60..ad3cce1 100644 --- a/example.env +++ b/example.env @@ -2,4 +2,18 @@ DATABASE_URL=sqlite+aiosqlite:///./mockapi.db ADMIN_USERNAME=admin ADMIN_PASSWORD=admin123 # Change this in production SECRET_KEY=your-secret-key-here-change-me -DEBUG=True + +# Application Settings +DEBUG=False +LOG_LEVEL=INFO +HOST=0.0.0.0 +PORT=8000 + +# OAuth2 Settings +OAUTH2_ISSUER=http://localhost:8000 +OAUTH2_ACCESS_TOKEN_EXPIRE_MINUTES=30 +OAUTH2_REFRESH_TOKEN_EXPIRE_DAYS=7 +OAUTH2_AUTHORIZATION_CODE_EXPIRE_MINUTES=10 +OAUTH2_SUPPORTED_GRANT_TYPES=["authorization_code", "client_credentials", "refresh_token"] +OAUTH2_SUPPORTED_SCOPES=["openid", "profile", "email", "api:read", "api:write"] +OAUTH2_PKCE_REQUIRED=false