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'"}
Follow steps @ https://join.lemmy.ml/docs/en/administration/install_ansible.html :
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible
install docker_compose plugin for ansible
ansible-galaxy collection install community.docker
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
Target server is Linode server running Ubuntu 20.10
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.
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...