covex-nn/docker-workflow-symfony

PHP deps not installed from scratch

tinpansoul opened this issue · 0 comments

Hello! I'm starting with this tutorial and cannot pass even getting started.

I'm using osx 10.16.2, homebrew and docker 18.06.1. My log here:

brew install docker docker-machine docker-machine-nfs

docker-machine create --driver virtualbox default
docker-machine start default
docker-machine env default
sudo nano /etc/hosts # "192.168.99.100  sci.mytld"
eval $(docker-machine env default)
docker-machine-nfs default

cd ~
rm -rf ~/Desktop/sci
git clone git@github.com:covex-nn/docker-workflow-symfony.git ~/Desktop/sci
cd ~/Desktop/sci

# Replace "docker.local" with "sci.mytld"
nano ./.travis.yml
nano ./Dockerfile-nginx
nano ./README.md

docker-compose up -d
docker-compose exec php phing # <=== Problem is here

And error is pretty simple: ERROR: No such service: php

$ docker-compose ps
      Name                   Command             State               Ports
---------------------------------------------------------------------------------------
sci_mysql_1        docker-entrypoint.sh mysqld   Up      0.0.0.0:3306->3306/tcp
sci_phpmyadmin_1   /run.sh supervisord -n        Up      0.0.0.0:8080->80/tcp, 9000/tcp

Tried later to use compose override file like this:

# ..... same clean setup .....
cp docker-compose.override.yml.dist docker-compose.override.yml
docker-compose up -d
docker-compose exec php phing # <=== Problem still here

But log is another:

$ docker-compose exec php phing
Buildfile: /srv/build.xml
 [property] Loading /srv/.env

Docker Symfony App > which-nc:


Docker Symfony App > database-ready:

     [echo] Waiting for a database on 'mysql:3306'...
DNS fwd/rev mismatch: mysql != sci_mysql_1.sci_default
mysql [172.18.0.2] 3306 (?) : Connection refused
    [retry] Attempt [0]: error occurred; retrying after 1 s...
DNS fwd/rev mismatch: mysql != sci_mysql_1.sci_default
mysql [172.18.0.2] 3306 (?) : Connection refused
    [retry] Attempt [1]: error occurred; retrying after 1 s...
DNS fwd/rev mismatch: mysql != sci_mysql_1.sci_default
mysql [172.18.0.2] 3306 (?) open
     [echo] Database is ready!

Docker Symfony App > database-deploy:

PHP Warning:  require(/srv/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /srv/bin/console on line 12
PHP Stack trace:
PHP   1. {main}() /srv/bin/console:0
PHP Fatal error:  require(): Failed opening required '/srv/bin/../vendor/autoload.php' (include_path='.:/usr/share/php') in /srv/bin/console on line 12
PHP Stack trace:
PHP   1. {main}() /srv/bin/console:0

BUILD FAILED
/srv/build.xml:25:99: Task exited with code 255

Total time: 2.2074 seconds

I guess, that here is two problems: not installed dependencies and no communication between php and mysql images. Why?


I'm newbie to docker-like-stuff, so, i don't know why php service doesn't start and how to fix it.
Globally trying to configure autodeploy symfony flex app with my GitLabCI.

Any ideas?