I'm trying to set up my project on VPS using Laradock and am getting an error
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'couchdb'
Unsupported config option for networks: 'frontend'
Unsupported config option for volumes: 'phpmyadmin'
When I run docker-compose up -d nginx mysql
It seems that this problem appears when .env
file does not exist or is invalid.
The problem is that my .env file exists and has the proper format/data. Same with docker-compose.yml
Locally I followed the same steps(MacOs) and everything worked without any problems. What am I doing wrong here?
Folder structure
| home
| | project
| | laradock
| | .env
| | .docker-compose.yml
| | ... other laradock stuff
OS - Ubuntu 20.04
Docker - 20.10.21, build 20.10.21-0ubuntu1~20.04.2
docker-compose - version 1.25.0, build unknown
docker-compose.yml I use - https://github.com/laradock/laradock/blob/master/docker-compose.yml
.env.example - https://github.com/laradock/laradock/blob/master/.env.example
So I finally solved it by simply adding
version: "3"
At the beginning of the docker-compose.yml
Though I have no idea why Laradock did not include it by default or why it worked locally.