Sign inSign up

baddate/mitra

By baddate

Updated about 2 months ago

Federated social network

Image
0

621

baddate/mitra repository overview

Unofficial Mitra Docker Image

One-click Mitra server & web setup.

The image is created from the main branches of mitra and mitra-web.

Docker Pulls Docker Image Size

Usage

# compose.yml
#
# Run Mitra using the pre-built image from Docker Hub
#
# Quick start:
#   1. Copy config:  cp /usr/share/mitra/examples/config.example.yaml ./config.yaml
#   2. Edit config:  $EDITOR config.yaml   (set domain, db credentials, etc.)
#   3. Start:        docker compose up -d
#
# Upgrading:
#   docker compose pull && docker compose up -d
#
# Viewing logs:
#   docker compose logs -f app

services:
  # ---------------------------------------------------------------------------
  # PostgreSQL – primary datastore
  # ---------------------------------------------------------------------------
  db:
    image: postgres:17-alpine
    container_name: mitra-db
    restart: unless-stopped
    environment:
      POSTGRES_DB: mitra
      POSTGRES_USER: mitra
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mitra}
    volumes:
      - db_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U mitra -d mitra"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s
    # Do not expose the DB port to the host by default.
    # Uncomment the line below only for local debugging.
    # ports: ["127.0.0.1:5432:5432"]

  # ---------------------------------------------------------------------------
  # Mitra
  # ---------------------------------------------------------------------------
  app:
    image: baddate/mitra:latest
    container_name: mitra-server
    restart: unless-stopped
    depends_on:
      db:
        condition: service_healthy
    ports:
      # Expose only on localhost; let a reverse proxy (nginx/Caddy) handle TLS.
      # Remember change http_host to '0.0.0.0'
      - "127.0.0.1:8383:8383"
    volumes:
      # Main config file – must exist before first start (see Quick start above)
      - ./config.yaml:/etc/mitra/config.yaml:ro
      # Persistent media uploads and instance data
      - mitra_data:/var/lib/mitra
      # Uncomment it to set favicon
      # change `/usr/share/mitra/www` to your web_client_dir
      # web_client_dir defined in config.yaml/toml
      # - ./favicon.ico:/usr/share/mitra/www/favicon.ico:ro
    environment:
      # The instance url int config.yaml/toml
      VITE_BACKEND_URL: ${VITE_BACKEND_URL:-http://127.0.0.1:8383}
    healthcheck:
      # change port to your custom port defined in config.toml/yaml
      test:
        [
          "CMD-SHELL",
          "wget -qO- http://localhost:8383/api/v1/instance || exit 1",
        ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s

volumes:
  db_data:
    driver: local
  mitra_data:
    driver: local

Tag summary

Content type

Image

Digest

sha256:238e879b4

Size

22.8 MB

Last updated

about 2 months ago

docker pull baddate/mitra