Lemmy: The Compose file '/srv/lemmy/docker-compose.yml' is invalid because:\nUnsupported config option for services.iframely: 'mem_limit'"

Created on 7 Mar 2021  路  8Comments  路  Source: LemmyNet/lemmy

Issue Summary

When trying to install Lemmy using Ansible, I receive the following error:

TASK [start docker-compose] ************************************************************
fatal: [[email protected]]: FAILED! => {"changed": false, "msg": "Configuration error - The Compose file '/srv/lemmy/docker-compose.yml' is invalid because:\nUnsupported config option for services.iframely: 'mem_limit'"}

Steps to Reproduce

Follow steps @ https://join.lemmy.ml/docs/en/administration/install_ansible.html :

  1. install ansible on Ubuntu (Pop!_OS 20.10)
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible
  1. install docker_compose plugin for ansible
    ansible-galaxy collection install community.docker

  2. Download Lemmy repository, configure lemmy/ansible/inventory and run ansible-playbook

git clone https://github.com/LemmyNet/lemmy.git
cd lemmy/ansible/
cp inventory.example inventory
nano inventory # enter your server, domain, contact email
# If the command below fails, you may need to comment out this line
# In the ansible.cfg file:
# interpreter_python=/usr/bin/python3
ansible-playbook lemmy.yml --become

only difference is I am doing sudo ansible-playbook lemmy.yml --become

Technical details

Target server is Linode server running Ubuntu 20.10

bug

All 8 comments

I ran into this as well, removing the mem_limit row from ansible/templates/docker-compose.yml solved the issue for me.

What does docker-compose --version show on the server? The given file works fine for us on Ubuntu 20.04 with docker-compose 1.25 and docker 19.03. Did you make any changes to docker-compose.yml?

I switched the server to Ubuntu 20.04 LTS and still the same error. I haven't modified anything other than the inventory file. Commenting out mem_limit allowed the installation to complete as @dagheyman mentioned

On the server:

root@localhost:~# docker-compose --version
docker-compose version 1.25.0, build unknown
root@localhost:~# docker --version
Docker version 19.03.8, build afacb8b7f0

Oh wait I see. Try changing the first line version: '3.3' to version: '2.2' and try again. Cause 3.3 is meant for Docker Swarm which we dont use, and it doesnt support mem_limit. So in our case we should actually use 2.x.

https://github.com/docker/compose/issues/4513

Problem solved! Thanks @Nutomic

Not quite, we still need to fix the file in the repo. Would you like to make a PR?

I would love to, I've never made one before. Let me give it a shot...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StaticallyTypedRice picture StaticallyTypedRice  路  6Comments

dcode picture dcode  路  6Comments

chopin2712 picture chopin2712  路  3Comments

Nutomic picture Nutomic  路  4Comments

juliangaal picture juliangaal  路  3Comments