I’m working to get a Lemmy instance spun up in Docker. I’m using the official docker-compose listed in the git repository. But when I bring the whole thing up, the Lemmy container keeps restarting. The other containers are fine.

The error I’m getting is:

thread 'main' panicked at 'Failed to load settings file, see documentation (https://join-lemmy.org/docs/en/administration/configuration.html): LemmyError { message: None, inner: Is a directory (os error 21), context: SpanTrace [] }', crates/utils/src/settings/mod.rs:20:20

Any help on how I can resolve this would be great. Thank you!

    • macstainlessOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Sure:

      version: "3.7"
      
      x-logging: &default-logging
        driver: "json-file"
        options:
          max-size: "50m"
          max-file: "4"
      
      services:
        proxy:
          image: nginx:1-alpine
          ports:
            # actual and only port facing any connection from outside
            # Note, change the left number if port 1236 is already in use on your system
            # You could use port 80 if you won't use a reverse proxy
            - "3535:8536"
          volumes:
            - ./nginx_internal.conf:/etc/nginx/nginx.conf:ro,Z
          restart: always
          logging: *default-logging
          depends_on:
            - pictrs
            - lemmy-ui
      
        lemmy:
          image: dessalines/lemmy
          container_name: Lemmy
          hostname: lemmy
          restart: always
          logging: *default-logging
          environment:
            - RUST_LOG="warn"
          volumes:
            - ./lemmy.hjson:/config/config.hjson:Z
          depends_on:
            - postgres
            - pictrs
      
        lemmy-ui:
          image: dessalines/lemmy-ui
          container_name: Lemmy-UI
          environment:
            - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536
            - LEMMY_UI_LEMMY_EXTERNAL_HOST=http://myURL.com
            - LEMMY_UI_HTTPS=true
          volumes:
            - ./volumes/lemmy-ui/extra_themes:/app/extra_themes
          depends_on:
            - lemmy
          restart: always
          logging: *default-logging
      
        pictrs:
          image: asonix/pictrs:0.4.0-rc.7
          container_name: Pictrs
          # this needs to match the pictrs url in lemmy.hjson
          hostname: pictrs
          # we can set options to pictrs like this, here we set max. image size and forced format for conversion
          # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
          environment:
            - PICTRS_OPENTELEMETRY_URL=http://otel:4137
            - PICTRS__API_KEY=ETB?57DRk$9Kz
            - RUST_LOG=debug
            - RUST_BACKTRACE=full
            - PICTRS__MEDIA__VIDEO_CODEC=vp9
            - PICTRS__MEDIA__GIF__MAX_WIDTH=256
            - PICTRS__MEDIA__GIF__MAX_HEIGHT=256
            - PICTRS__MEDIA__GIF__MAX_AREA=65536
            - PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=400
          user: 991:991
          volumes:
            - ./volumes/pictrs:/mnt:Z
          restart: always
          logging: *default-logging
          deploy:
            resources:
              limits:
                memory: 690m
      
        postgres:
          image: postgres:15-alpine
          container_name: Postgres
      
          hostname: postgres
          environment:
            - POSTGRES_USER=my_username
            - POSTGRES_PASSWORD=my_password
            - POSTGRES_DB=lemmy
          volumes:
            - ./volumes/postgres:/var/lib/postgresql/data:Z
            - ./customPostgresql.conf:/etc/postgresql.conf
          restart: always
          logging: *default-logging
      
        postfix:
          image: mwader/postfix-relay
          environment:
            - POSTFIX_myhostname=my_URL
          restart: "always"
          logging: *default-logging