Try describing what you need:

Alexandrie logo

Alexandrie

★ 3.7k

Community Ratings

No ratings yet

Details

Last Updated
Nov 1, 2026
Created
Aug 21, 2022
Deployment

Deployment: Docker Compose ✓4 Containers — moderate hosting footprintRuns as 4 containers

Run Alexandrie yourself

Pick how much you want to manage.

Is this your project? Sponsor a listing

Run Alexandrie with Docker Compose

Compose file from the Alexandrie project repository.

4 services · database: mysql · infra: mysql · 1 unclassified (rustfs)

no resource limits declared

needs persistent storage (3 volumes)

docker-compose.yml · @ 429e2b9 · scanned Nov 1, 2026

services:
  # MySQL Database
  mysql:
    image: mysql:8.0
    container_name: alexandrie-mysql
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}
      MYSQL_DATABASE: ${MYSQL_DATABASE:-alexandrie}
      MYSQL_USER: ${MYSQL_USER:-alexandrie}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-password}
    volumes:
      - mysql_data:/var/lib/mysql
    ports:
      - "${MYSQL_EXTERNAL_PORT:-3307}:3306"
    networks:
      - alexandrie-network
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "mysql -u$${MYSQL_USER} -p$${MYSQL_PASSWORD} -e 'SELECT 1' $${MYSQL_DATABASE}",
        ]
      timeout: 10s
      retries: 5
      interval: 30s
      start_period: 30s

  # Object Storage (RustFS, S3 compatible)
  rustfs:
    image: rustfs/rustfs:latest
    container_name: alexandrie-rustfs
    restart: unless-stopped
    environment:
      RUSTFS_ACCESS_KEY: ${RUSTFS_ACCESS_KEY:-alexandrie-key}
      RUSTFS_SECRET_KEY: ${RUSTFS_SECRET_KEY:-alexandrie-secret}
      RUSTFS_CONSOLE_ENABLE: "${RUSTFS_CONSOLE_ENABLE:-false}"
      RUSTFS_LOG_LEVEL: ${RUSTFS_LOG_LEVEL:-info}
    ports:
      - "${RUSTFS_EXTERNAL_PORT:-9000}:9000"
    volumes:
      - rustfs_data:/data
      - rustfs_logs:/logs
    networks:
      - alexandrie-network
    healthcheck:
      test: ["CMD-SHELL", "nc -z localhost 9000 || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s

  # Alexandrie Backend
  backend:
    image: ghcr.io/smaug6739/alexandrie-backend:latest
    #build:
    #  context: ./backend
    #  dockerfile: Dockerfile
    container_name: alexandrie-backend
    environment:
      # General configuration
      BACKEND_PORT: 8201
      GIN_MODE: release

      # Security and authentication
      JWT_SECRET: ${JWT_SECRET:-your-secure-jwt-secret-key-change-this-in-production}
      COOKIE_DOMAIN: ${COOKIE_DOMAIN:-localhost:8200} # Common domain for cookies (e.g., yourdomain.com if you have frontend.yourdomain.com and api.yourdomain.com)
      FRONTEND_URL: ${FRONTEND_URL:-http://localhost:8200} # URL where the frontend is hosted (for CORS policy and url generation in emails)
      ALLOW_UNSECURE: "${ALLOW_UNSECURE:-true}" # Set to 'true' if you run without HTTPS (e.g., local dev);

      # Flags
      CONFIG_DISABLE_SIGNUP: "${CONFIG_DISABLE_SIGNUP:-false}" # Disable user signup if set to 'true'
      CONFIG_DISABLE_NATIVE_LOGIN: "${CONFIG_DISABLE_NATIVE_LOGIN:-false}" # Disable native username/password login if set to 'true' (useful if you only want OAuth providers)

      # Database Configuration
      DATABASE_HOST: mysql
      DATABASE_PORT: 3306
      DATABASE_NAME: ${MYSQL_DATABASE:-alexandrie}
      DATABASE_USER: ${MYSQL_USER:-alexandrie}
      DATABASE_PASSWORD: ${MYSQL_PASSWORD:-password}

      # Object storage configuration (S3 compatible like RustFS, MinIO, etc.)
      # OPTIONAL: If you don't want to use the CDN feature you can leave these variables empty
      MINIO_ENDPOINT: rustfs:9000
      MINIO_PUBLIC_URL: ${CDN_URL:-http://localhost:${RUSTFS_EXTERNAL_PORT:-9000}}
      MINIO_SECURE: "${MINIO_SECURE:-false}" # Set to 'true' if your S3 endpoint uses HTTPS
      MINIO_INSECURE_TLS: "${MINIO_INSECURE_TLS:-false}" # Set to 'true' if your S3 endpoint uses self-signed certificates
      MINIO_ACCESSKEY: ${RUSTFS_ACCESS_KEY:-alexandrie-key}
      MINIO_SECRETKEY: ${RUSTFS_SECRET_KEY:-alexandrie-secret}
      MINIO_BUCKET: ${MINIO_BUCKET:-alexandrie}

      # SMTP Configuration (only for password reset emails)
      # OPTIONAL: If you don't want to use email features, you can leave these variables empty
      SMTP_HOST: ${SMTP_HOST:-}
      SMTP_MAIL: ${SMTP_MAIL:-}
      SMTP_MAIL_FROM: ${SMTP_MAIL_FROM:-}
      SMTP_PASSWORD: ${SMTP_PASSWORD:-}

    ports:
      - "${BACKEND_EXTERNAL_PORT:-8201}:8201"
    extra_hosts:
      - "localhost:host-gateway"
    depends_on:
      mysql:
        condition: service_healthy
      rustfs:
        condition: service_healthy
    networks:
      - alexandrie-network

  # Alexandrie Frontend
  frontend:
    image: ghcr.io/smaug6739/alexandrie-frontend:latest
    #build:
    #  context: ./frontend
    #  dockerfile: Dockerfile
    container_name: alexandrie-frontend
    restart: unless-stopped
    environment:
      PORT: 8200

      # Flags
      NUXT_PUBLIC_CONFIG_DISABLE_SIGNUP_PAGE: "${CONFIG_DISABLE_SIGNUP:-false}" # Disable signup page if set to 'true'
      NUXT_PUBLIC_CONFIG_DISABLE_LANDING_PAGE: "${CONFIG_DISABLE_LANDING:-false}" # Disable landing page

      # Runtime configuration - builds with these values at startup
      NUXT_PUBLIC_BASE_API: ${API_URL:-http://localhost:8201}
      NUXT_PUBLIC_BASE_CDN: ${CDN_URL:-http://localhost:9000}
      NUXT_PUBLIC_CDN_ENDPOINT: ${CDN_ENDPOINT:-/alexandrie/}
      NUXT_PUBLIC_BASE_URL: ${FRONTEND_URL:-http://localhost:8200}

    ports:
      - "${FRONTEND_EXTERNAL_PORT:-8200}:8200"
    depends_on:
      - backend
    networks:
      - alexandrie-network

networks:
  alexandrie-network:
    driver: bridge

volumes:
  mysql_data:
  rustfs_data:
  rustfs_logs:

This file may be out of date. Check the Alexandrie website for current setup steps.

Track your self-hosted stack

Bookmark software to try, rate tools you've used, and keep your collection in one place.