django-ecommerce-project-v2 icon indicating copy to clipboard operation
django-ecommerce-project-v2 copied to clipboard

Unsupported config option for services: 'pgdb'

Open DaveJ61 opened this issue 2 years ago • 6 comments

Hi Zander,

I seriously doubt this is an issue with your code but I'm just reaching out for some assistance. I've read countless web pages regarding this problem I'm having but none have been able to solve it. I have been struggling with docker for a few days now. Installation on linux is far from "simple" and there are version and dependency issues, depending on the linux distro one is using.

Using the docker-compose.yml script in your github repo, I get the following:-

ERROR: Version in "./docker-compose.yaml" is unsupported. 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. For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

According to what I have read, Version is now deprecated, so I commented out the Version line, but this throws another error:-

ERROR: The Compose file './docker-compose.yaml' is invalid because: Unsupported config option for services: 'pgdb`

Installing the docker desktop is easier but I think it also still has problems as a part of it is not functioning. It is also still in beta. If I can't get this going, then I will have to resort to installing and using postgres or mysql on the OS as usual.

The yaml script I am using is exactly the same as yours and I am not posting it below as it is a waste of time. The reason being is that adding code using ctrl-e as above results in all the tabs and whitespace being removed. Why? I don't know, but it is not a browser problem, and it isn't me, I don't think.

Dave

DaveJ61 avatar Apr 04 '22 07:04 DaveJ61

Hi Dave, let me see if I can replicate the problem. What Linux distro you working with?

zander9648 avatar Apr 04 '22 09:04 zander9648

Hi Zander,

Thanks for the quick response. Apologies for not originally disclosing this but I am running Mint 20.2. The standard repository version of docker didn't work either, so I downloaded it using their .deb packages and Docker's own repository. The docker-desktop was downloaded from their repo as a package.

DaveJ61 avatar Apr 04 '22 12:04 DaveJ61

Ok I will make a tutorial for installing and setting up Docker in Mint 20.3 take it from there.

zander9648 avatar Apr 04 '22 13:04 zander9648

Sorry Dave, I can't use Mint on M1 chip in a VM. Ubuntu is very similar, I will do a run through, maybe there is something familiar there.

zander9648 avatar Apr 04 '22 16:04 zander9648

Hi Zander,

After much diagnosing, reading, googling and fiddling I now have a working docker installation on Linux Mint 20.2. I followed the directions from the docker website using the directions for Ubuntu Focal and installed docker using their repository. Even then this had issues but I was able to run with elevated privileges using sudo docker run hello-world without a problem. I followed docker's instructions for running docker as a standard user but I kept getting the error:-

docker: Cannot connect to the Docker daemon at unix:///run/user/1000/docker.sock. Is the docker daemon running?. See 'docker run --help'.

I had already made myself a member of the docker group using sudo usermod -aG docker $(whoami) as per instructions but this made no difference. I dug deeper for a while longer, and eventually found an undocumented solution which is caused by the installation process setting the environment variable DOCKER_HOST to unix:///run/user/1000/docker.sock I corrected this by running the following:-

$ unset DOCKER_HOST $ rm -rf ~/.docker

After doing this, I was then able to run docker run hello-world and subsequently docker-compose up without root privileges. However, I believe there is an instruction to add export DOCKER_HOST=unix:///run/user/1000/docker.sock to the .bashrc file. I removed this as every time a new terminal was created, I was back to square one and had to unset the DOCKER_HOST variable.

I think it may still be worthwhile producing a howto tutorial on this because on linux it appears to be subject to pitfalls caused by irregularities and differences of linux distros.

Oh and before I forget, I had to set the version line in the docker-compose.yml file to version: "3.7"

Keep up the good work...!!

Best regards

Dave

DaveJ61 avatar Apr 07 '22 05:04 DaveJ61

Thanks. I think some maybe due to the fact I have never used docker. I've just installed what I needed to on the same virtualbox vm. Docker seemed a good way forward and an ideal opportunity to learn it. I'll wait to hear from you regarding the tutorial.

On Mon, 4 Apr 2022, 14:35 Zander, @.***> wrote:

Ok I will make a tutorial for installing and setting up Docker in Mint 20.3 take it from there.

— Reply to this email directly, view it on GitHub https://github.com/veryacademy/django-ecommerce-project-v2/issues/9#issuecomment-1087566263, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN3OL6JT7C7BXIMYBC2G4DVDLV27ANCNFSM5SOS4HTQ . You are receiving this because you authored the thread.Message ID: @.***>

DaveJ61 avatar Oct 11 '22 08:10 DaveJ61