Hey guys, im writing here because i’m really out of options and ideas. I have been trying to set up my lemmy instance in docker put i keep failing at the first step. I have filled every {{}} detail and still getting this error:

The Compose file ‘./docker-compose.yml’ is invalid because: Invalid top-level property “x-logging”. Valid top-level sections for this Compose file are: version, services, networks, volumes, secrets, configs, and extensions starting with “x-”.

You might be seeing this error because you’re using the wrong Compose file version. Either specify a supported version (e.g “2.2” or “3.3”) and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.

I have tried to edit the version number, even deleting it but then im getting this:

The Compose file ‘./docker-compose.yml’ is invalid because: Unsupported config option for x-logging: ‘options’ Unsupported config option for services: ‘proxy’

Do you have any idea?

Edit: Thank you all for the ideas. Actually the docker compose up -d solved it!

  • drdaeman@lemmy.zhukov.al
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    This looks good to me. I suspect the problem is not with the compose file itself, but in the tool you’re invoking - something must be wrong with docker-compose. Try using docker compose up -d instead of docker-compose up -d (requires Docker v20.10.13+).

    Posting output of docker-compose version, docker version and docker compose version may shine some light on this.

    • Vitya@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      docker compose up -d

      Jesus man that was it. docker compose up -d solved it. Thank you so much

      • drdaeman@lemmy.zhukov.al
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        This means your docker-compose is very outdated or even broken.

        To give you some context, originally Docker Compose was a separate project. It’s a separate program called docker-compose. It evolved for quite a while, and was eventually rewritten and included as a part of Docker itself, becaming a sub-command (docker compose).

        Just uninstall the old Compose (so it won’t cause you any issues) and keep only Docker.

    • Vitya@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Alright now im getting

      Error!

      There was an error on the server. Try refreshing your browser. If that doesn’t work, come back at a later time. If the problem persists, you can seek help in the Lemmy support community or Lemmy Matrix room.

      but thats progress

      • drdaeman@lemmy.zhukov.al
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        This means Lemmy container is up and running, but there is some error on the backend that prevents it from functioning correctly. A pretty wild guess, but it’s probably something with the database.

        docker compose logs may tell a bit more about what’s going on. Check out this page https://join-lemmy.org/docs/administration/troubleshooting.html (just remember to replace docker-compose with docker compose - again, I specifically recommend to uninstall docker-compose so it won’t accidentally mess things up).

        If it’s not something obvious, one thing you may try is tear everything down (docker compose down -v), change lemmy:latest to lemmy:0.18.1 in your Compose file, and try starting again. This will use explicit version number and it may help if the latest tag is not something we expect it to be. E.g. I had issues spinning up clean 0.17.4 - it had a bug in DB migrations that was supposed to be fixed in 0.18.