Skip to content

Docker Deployment

This guide covers deploying the School Clubs application using Docker.

Prerequisites

  • Docker and Docker Compose installed
  • Domain name configured (e.g., se.unilu.dev)
  • Traefik reverse proxy running

Quick Start

  1. Clone the repository:

    git clone https://github.com/DrKarlheinz/SE1.git
    cd SE1
    

  2. Configure environment variables:

    cp .env.example .env
    # Edit .env and set SECRET_KEY
    

  3. Start the application:

    docker compose up -d --build
    

  4. Access the application:

  5. Main app: https://se.unilu.dev
  6. Documentation: https://docs.se.unilu.dev

Configuration

Environment Variables

Variable Description Default
SECRET_KEY Flask secret key only-set-server-side
DATABASE_URI Database connection string sqlite:////data/data.db

Traefik Labels

The application uses these Traefik labels for routing:

  • Main app: Host(\se.unilu.dev`)`
  • Documentation: Host(\docs.se.unilu.dev`)`

Both use automatic HTTPS with Let's Encrypt.

Database Persistence

SQLite database is stored in a Docker volume:

volumes:
  school-clubs-data:
    driver: local

Updating

Changes pushed to the dev branch automatically deploy via GitHub Actions.

Manual update:

git pull origin dev
docker compose up -d --build