Skip to main content

Prerequisites

  • Python 3.11+
  • uv (fast Python package manager)
Optional:
  • Redis (for background tasks with Celery)
  • PostgreSQL (SQLite works by default)

Local Setup

# Install uv
pip install uv  # or: curl -sSf https://astral.sh/uv/install.sh | bash

# Clone and setup
git clone [email protected]:level09/enferno.git
cd enferno
./setup.sh                # Installs deps + generates secure .env
uv run flask create-db    # Setup database
uv run flask install      # Create admin user
uv run flask run          # Start server
Visit http://localhost:5000 to see your application.

Adding Background Tasks

When you need Celery for async jobs:
uv sync --extra full      # Adds Redis + Celery
# Set REDIS_URL, CELERY_BROKER_URL in .env

Docker Setup

Full production stack with one command:
docker compose up --build
Includes Redis, PostgreSQL, Nginx, and Celery.

Environment Configuration

Key variables in .env:
SECRET_KEY=your_secret_key
FLASK_APP=run.py
FLASK_DEBUG=1                    # 0 in production

# PostgreSQL (optional - SQLite works by default)
# SQLALCHEMY_DATABASE_URI=postgresql://user:pass@localhost/dbname

# Background tasks (optional)
# REDIS_URL=redis://localhost:6379/1
# CELERY_BROKER_URL=redis://localhost:6379/2

Next Steps