Error using standard '/etc/elabftw.yml' generated by a fresh installation
Closed this issue · 1 comments
Description of the bug
Configuring eLabFTW with elabctl fails with an error at 'elabctl start'
To Reproduce
Steps to reproduce the behavior:
- Install 'docker' (verified by 'docker run hello-world')
- Download 'elabctl' and make it executable
- Generate '/etc/elabftw.yml' the command 'elabctl install' & answering the questions
- Starting the script (command 'elabctl start') produces the error:
ERROR: The Compose file '/etc/elabftw.yml' is invalid because:
services.web.depends_on contains an invalid type, it should be an array
Expected behavior
Script 'elabctl start'' should run without errors.
Additional context
Content of the original script:
# make sure we wait for mysql to be available before starting
# comment this out if you're not using a mysql container
# note: the mysql container needs an healthcheck block for this to work
depends_on:
mysql:
condition: service_healthy
Many solutions on the web suggest to change the code to fulfill the "type: array" requirement:
depends_on:
- mysql:
condition: service_healthy
But this only changes the error to:
ERROR: The Compose file '/etc/elabftw.yml' is invalid because:
services.web.depends_on contains an invalid type, it should be a string
(By the way: Only one error can be true!
The type in the config file should be the type required by the program. Here the 'required type' changes with the config file.)
Here is a modified script that at least solved the config file issue for me:
depends_on:
- mysql
# condition: service_healthy
Now elabctl complains about ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
. But this is another issue ...
Hello,
You forgot to provide the version of docker-compose
you are using, or information about your system. The compose file for elab works with recent versions of docker-compose. I think yours is too old.