decidim / docker

Docker images for decidim
https://decidim.org
12 stars 18 forks source link

docker-compose.yml is not functional #90

Open kwisatz opened 2 years ago

kwisatz commented 2 years ago

Attempting to use the docker-compose file results in:

Creating decidim_pg_1    ... done
Creating decidim_redis_1 ... done
Creating decidim_decidim_1 ... error

ERROR: for decidim_decidim_1  Cannot start service decidim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/code/vendor/hello-world.sh": stat /code/vendor/hello-world.sh: no such file or directory: unknown

ERROR: for decidim  Cannot start service decidim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/code/vendor/hello-world.sh": stat /code/vendor/hello-world.sh: no such file or directory: unknown
ERROR: Encountered errors while bringing up the project.

Trying to run it without the entrypoint and cmd overrides gives me:

pg_1       | 2021-12-09 18:32:43.642 UTC [96] FATAL:  database "code_development" does not exist
decidim_1  |   
decidim_1  | ActiveRecord::NoDatabaseError (FATAL:  database "code_development" does not exist
decidim_1  | ):
decidim_1  |   
andreslucena commented 2 years ago

Which commands are you running @kwisatz?

kwisatz commented 2 years ago

@andreslucena that was a simple docker-compose up

andreslucena commented 2 years ago

@andreslucena that was a simple docker-compose up

And before that? Are you trying to docker-compose up in a generated app or the one provided in this repository?

I can confirm that the current instructions that we have in the README for this repository for the HelloWorld app are valid and that the docker-compose is working well.

git clone git@github.com:decidim/docker.git decidim-docker
cd decidim-docker
docker-compose up 
loleg commented 2 years ago

I got similar errors, had to stop the conatiners after "first boot" and restart. Then the application came up fine.

Othman-Benbrahim commented 1 year ago

I have the same error. It's don't working. Can you help me?

kwisatz commented 1 year ago

@andreslucena I can no longer reproduce my initial issue with the latest revision. The containers spin up fine and I get a working instance on localhost:3000.

However, since images were moved to ghcr.io your instructions no longer work out of the box:

kwisatz@thufir:~/1024/tmp$ git clone git@github.com:decidim/docker.git decidim-docker
Cloning into 'decidim-docker'...
remote: Enumerating objects: 788, done.
remote: Counting objects: 100% (121/121), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 788 (delta 53), reused 106 (delta 52), pack-reused 667
Receiving objects: 100% (788/788), 182.09 KiB | 1024.00 KiB/s, done.
Resolving deltas: 100% (419/419), done.
kwisatz@thufir:~/1024/tmp$ cd decidim-docker
kwisatz@thufir:~/1024/tmp/decidim-docker - master $ docker compose up
[+] Running 0/1
 ⠿ decidim Error                                                                                                                                                                                              0.5s
Error response from daemon: Head "https://ghcr.io/v2/decidim/decidim/manifests/latest": denied: denied

A classic token having read:packages permissions must be generated (see github docs) and users need to log in (docker login ghcr.io) prior to running docker compose up. This should probably be reflected in the readme.

alecslupu commented 1 year ago

@kwisatz , can you make a small PR about it ? Thanks

punkyard commented 6 months ago

@andreslucena that was a simple docker-compose up

And before that? Are you trying to docker-compose up in a generated app or the one provided in this repository?

I can confirm that the current instructions that we have in the README for this repository for the HelloWorld app are valid and that the docker-compose is working well.

git clone git@github.com:decidim/docker.git decidim-docker
cd decidim-docker
docker-compose up 

Hi, I can't download this git - it asks for permission ..

punkyard commented 6 months ago

Attempting to use the docker-compose file results in:

Creating decidim_pg_1    ... done
Creating decidim_redis_1 ... done
Creating decidim_decidim_1 ... error

ERROR: for decidim_decidim_1  Cannot start service decidim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/code/vendor/hello-world.sh": stat /code/vendor/hello-world.sh: no such file or directory: unknown

ERROR: for decidim  Cannot start service decidim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/code/vendor/hello-world.sh": stat /code/vendor/hello-world.sh: no such file or directory: unknown
ERROR: Encountered errors while bringing up the project.

Trying to run it without the entrypoint and cmd overrides gives me:

pg_1       | 2021-12-09 18:32:43.642 UTC [96] FATAL:  database "code_development" does not exist
decidim_1  |   
decidim_1  | ActiveRecord::NoDatabaseError (FATAL:  database "code_development" does not exist
decidim_1  | ):
decidim_1  |   

to start my docker-compose.yml with the actual version of decidim latest : 0.28.0 I had to start with something like this:

$ sudo mkdir /docker/decidim $ cd /docker/decidim $ sudo docker run -it -v "/docker/decidim/code-0280:/code" ghcr.io/decidim/decidim-generator:0.28.0 decidim decidim-0280 $ sudo chown -R root: code-0280