Docker Compose Setup for Running Littlefedi

Once we have the Dockerfile for building a littlefedi docker image, we can then make use of it and setup docker compose for it:

networks:
  frontend:
    name: frontend
    external: true

services:
  littlefedi:
    image: littlefedi
    build: ./littlefedi
    environment:
      - LITTLEFEDI_AUTH_MFA_ENCRYPTION_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      - LITTLEFEDI_AUTH_REQUIRE_ADMIN_MFA=true
      - LITTLEFEDI_MEDIA_PROXY_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      - LITTLEFEDI_SMTP_PASSWORD=XXXXXXXXXXXXXXXXX
    ulimits:
      nofile: 65536
    restart: unless-stopped
    networks:
      - frontend
    volumes:
      - ./data:/data
      - ./config:/config
      - ./backup:/backup

Notes:

  • the frontend network is reverse-proxied through caddy

    xyzzy.cafe {
          reverse_proxy littlefedi:8080
    }
    
  • the Dockerfile and the littlefedi sources are located in a littlefedi subdirectory.

  • For the value of the environment variables, have a look at littlefedi's documents.

To give it all a spin:

docker compose build littlefedi
docker compose up

#littlefedi #DockerCompose

Replies

No public replies are known to this instance.