Configuration
Configure Mole using environment variables.
Environment Variables
Copy .env.example to .env and adjust the values:
cp .env.example .env
Backend Variables
| Variable | Description | Default |
|---|---|---|
API_KEY |
Bearer token required by every endpoint | your-secret-api-key |
PostgreSQL and Redis were removed along with the unused Celery stack; there is no database or broker behind this service. See issue #101.
Frontend Variables
Frontend variables use the VITE_ prefix. Vite inlines any variable with that
prefix into the client bundle at build time, so these are build arguments rather
than runtime settings; see the Vite migration in
#110.
| Variable | Description | Default |
|---|---|---|
VITE_BACKEND_URL |
Backend API URL | http://localhost:8000 |
VITE_API_KEY |
Bearer token sent by the frontend | none |
Docker Configuration
When using Docker Compose, environment variables are set in the docker-compose.yml file.
Local Development
For local development without Docker:
- Backend: Set environment variables or create
.envfile inbackend/directory - Frontend: Set
VITE_BACKEND_URLandVITE_API_KEYinfrontend/.envor the environment. Only theVITE_prefix is exposed to the bundle; other variables are not readable from client code.
Security Notes
- Never commit
.envfiles to version control - Use strong passwords in production
- Configure HTTPS in production deployments