contentacms / contenta_docker

51 stars 30 forks source link

docker-compose up fails #25

Open Max-Zviagintsev opened 6 years ago

Max-Zviagintsev commented 6 years ago

Docker for Windows Version 18.06.1-ce-win73 (19507) When making clean install after successfully run docker-compose build I try docker-compose up and always get:

λ docker-compose up
Starting contenta_docker_php_1      ... done
Starting contenta_docker_database_1 ... done
Starting contenta_docker_nginx_1    ... done
Attaching to contenta_docker_php_1, contenta_docker_database_1, contenta_docker_nginx_1
php_1       | standard_init_linux.go:190: exec user process caused "no such file or directory"
database_1  | standard_init_linux.go:190: exec user process caused "no such file or directory"
nginx_1     | nginx: [emerg] host not found in upstream "php" in /etc/nginx/sites/drupal.conf:62
contenta_docker_database_1 exited with code 1
contenta_docker_php_1 exited with code 1
contenta_docker_nginx_1 exited with code 1

I've found that somebody already introduced fixes for this before, but somehow they are not working for me.

AntoninSlejska commented 6 years ago

I have the same problem (Docker version: 18.06.1-ce-win73 (19507)):

$ docker-compose up
Creating network "contenta_docker_contenta" with the default driver
Creating volume "contenta_docker_data" with default driver
Creating contenta_docker_database_1 ... done
Creating contenta_docker_php_1      ... done
Creating contenta_docker_nginx_1    ... done
Attaching to contenta_docker_database_1, contenta_docker_php_1, contenta_docker_nginx_1
database_1  | standard_init_linux.go:190: exec user process caused "no such file or directory"
php_1       | standard_init_linux.go:190: exec user process caused "no such file or directory"
nginx_1     | nginx: [emerg] host not found in upstream "php" in /etc/nginx/sites/drupal.conf:62
contenta_docker_database_1 exited with code 1
contenta_docker_php_1 exited with code 1
contenta_docker_nginx_1 exited with code 1
AntoninSlejska commented 6 years ago

My colleague Jörg have tried to delete everything:

docker system prune -a

Then he started from null, but set the Git configuration autoclrf to 'input':

git clone https://github.com/contentacms/contenta_docker.git --config core.autocrlf=input
cd contenta_docker
docker-compose build
...

It worked by him. I have tried it as well, and the Contenta CMS works by me now.

pcambra commented 6 years ago

Maybe prune is a bit drastic, but removing the volumes and containers to ensure everything is rebuilt? or --force-recreate in the docker-compose would work as well?

AntoninSlejska commented 6 years ago

@pcambra I suppose it should be sufficient. The crucial measure, which has to be taken, is: 'git clone ... --config core.autocrlf=input'.

pcambra commented 5 years ago

I got why this is failing, this is part of what I mentioned on https://github.com/contentacms/contenta_docker/issues/21 about making the install more robust.

What was happening is that the php container was failing due composer not being able to run install on a non-empty folder and thus nginx cannot start.

This commit should make it a bit better https://github.com/contentacms/contenta_docker/commit/b45bcd2c559ad3fe9ea97b8214160fff6a9fe5ce

It'd be great if someone would confirm this is fixed or we need to keep digging.