chore(env): Present example env file properly

This commit is contained in:
Jose Daniel G. Percy 2025-04-08 21:55:17 +08:00
parent 92f011282d
commit 786979f005
3 changed files with 14 additions and 5 deletions

5
.env
View File

@ -1,5 +0,0 @@
# .env
DATABASE_URL=mysql://lms_user:lms_password@db:3306/lms_db
SERVER_ADDR=0.0.0.0:8080
# SECRET_KEY=your_very_secret_jwt_key_here # Needed if using JWT later
RUST_LOG=actix_web=info,lms_backend=info # Logging level

12
.env.example Normal file
View File

@ -0,0 +1,12 @@
# .env (in the root directory)
# MariaDB Credentials (used by docker-compose to init the DB)
MARIADB_ROOT_PASSWORD=supersecretroot
MARIADB_DATABASE=lms_db
MARIADB_USER=lms_user
MARIADB_PASSWORD=lms_password
# Backend Configuration (can override defaults)
# SERVER_ADDR=0.0.0.0:8080 # Already set in compose file
RUST_LOG=info,lms_backend=debug # Example: Set backend log level to debug
# SECRET_KEY=your_secret_for_jwt_if_used # Needed if switching to JWT sessions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
.env
# ---> Rust
# Generated by Cargo
# will have compiled files and executables