feat: Add PostgreSQL support and configuration setup for PunimTag

This commit introduces PostgreSQL as the default database for the PunimTag application, along with a new `.env.example` file for configuration. A setup script for PostgreSQL has been added to automate the installation and database creation process. The README has been updated to reflect these changes, including instructions for setting up PostgreSQL and using the `.env` file for configuration. Additionally, the database session management has been enhanced to support PostgreSQL connection pooling. Documentation has been updated accordingly.
This commit is contained in:
tanyar09
2025-11-14 12:44:12 -05:00
parent c661aeeda6
commit 8caa9e192b
6 changed files with 400 additions and 16 deletions
+16
View File
@@ -0,0 +1,16 @@
# Database Configuration
# PostgreSQL (for network database)
DATABASE_URL=postgresql+psycopg2://punimtag:punimtag_password@localhost:5432/punimtag
# Or use SQLite for local development (default if DATABASE_URL not set)
# DATABASE_URL=sqlite:///data/punimtag.db
# Photo Storage
PHOTO_STORAGE_DIR=data/uploads
# JWT Secrets (change in production!)
SECRET_KEY=your-secret-key-here-change-in-production
# Single-user credentials (change in production!)
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin