gisoftlab / tlusty_test

REACT developer test
MIT License
0 stars 6 forks source link

getting ERROR: No container found for php_1 on third step #1

Open kamilDevguru opened 5 years ago

kamilDevguru commented 5 years ago

I have cloned your test project and installed the latest version of docker on my pc.

and I was following the steps to run the api server. Create your own fork of this repository.

docker-compose pull
COMPOSE_HTTP_TIME=300 docker-compose up -d.
docker-compose exec php bin/console doctrine:schema:update --force.
docker-compose exec php bin/console doctrine:fixtures:load
-- PORT 80 has to be open.

but when I run the fourth command. I got this error.

ERROR: No container found for php_1

any idea?

gisoftlab commented 5 years ago

Probably 80 PORT is using by some process. Check which service is using 80 port and disable that process. => sudo netstat -p -nlp | grep 80 => disable service => COMPOSE_HTTP_TIME=300 docker-compose up -d. => docker-compose ps => to check all component are working

kamilDevguru commented 5 years ago
---------------------------------------------------------------------------------------------------
tlusty_test_admin_1         /bin/sh -c yarn start            Exit 1
tlusty_test_api_1           nginx -g daemon off;             Up       0.0.0.0:8080->80/tcp
tlusty_test_cache-proxy_1   docker-varnish-entrypoint  ...   Exit 2
tlusty_test_client_1        /bin/sh -c yarn start            Exit 1
tlusty_test_db_1            docker-entrypoint.sh postgres    Up       0.0.0.0:5432->5432/tcp
tlusty_test_h2-proxy_1      nginx -g daemon off;             Exit 1
tlusty_test_mercure_1       ./mercure                        Up       443/tcp, 0.0.0.0:1337->80/tcp
tlusty_test_php_1           docker-entrypoint php-fpm        Exit 1

this is what i am getting after hit docker-compose ps

kamilDevguru commented 5 years ago

Some services are automatically exited. any idea?

gisoftlab commented 5 years ago

docker-compose stop docker-compose down COMPOSE_HTTP_TIME=300 docker-compose up -d

if some component would be down then repeat. COMPOSE_HTTP_TIME=300 docker-compose up -d

kamilDevguru commented 5 years ago
tlusty_test_admin_1         /bin/sh -c yarn start            Exit 1
tlusty_test_api_1           nginx -g daemon off;             Up       0.0.0.0:8080->80/tcp
tlusty_test_cache-proxy_1   docker-varnish-entrypoint  ...   Exit 2
tlusty_test_client_1        /bin/sh -c yarn start            Exit 1
tlusty_test_db_1            docker-entrypoint.sh postgres    Up       0.0.0.0:5432->5432/tcp
tlusty_test_h2-proxy_1      nginx -g daemon off;             Exit 1
tlusty_test_mercure_1       ./mercure                        Up       443/tcp, 0.0.0.0:1337->80/tcp
tlusty_test_php_1           docker-entrypoint php-fpm        Exit 1

tried several times, but no luck ;(

gisoftlab commented 5 years ago

You can try one by one and check errors log what exactly is happen.

COMPOSE_HTTP_TIME=300 docker-compose up admin COMPOSE_HTTP_TIME=300 docker-compose up cache-proxy COMPOSE_HTTP_TIME=300 docker-compose up client COMPOSE_HTTP_TIME=300 docker-compose up h2-proxy COMPOSE_HTTP_TIME=300 docker-compose up php

kamilDevguru commented 5 years ago
Attaching to tlusty_test_admin_1
admin_1        | yarn run v1.12.3
admin_1        | error Couldn't find a package.json file in "/usr/src/admin"
admin_1        | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
tlusty_test_admin_1 exited with code 1
kamilDevguru commented 5 years ago
tlusty_test_db_1 is up-to-date
Starting tlusty_test_php_1 ... done
tlusty_test_api_1 is up-to-date
Starting tlusty_test_cache-proxy_1 ... done
Attaching to tlusty_test_cache-proxy_1
cache-proxy_1  | Error: Cannot read -f file '/usr/local/etc/varnish/default.vcl' (No such file or directory)
cache-proxy_1  | (-? gives usage)
tlusty_test_cache-proxy_1 exited with code 2
kamilDevguru commented 5 years ago
Starting tlusty_test_client_1 ... done
Attaching to tlusty_test_client_1
client_1       | yarn run v1.12.3
client_1       | error Couldn't find a package.json file in "/usr/src/client"
client_1       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
tlusty_test_client_1 exited with code 1
kamilDevguru commented 5 years ago
Attaching to tlusty_test_h2-proxy_1
h2-proxy_1     | 2019/07/30 22:49:23 [emerg] 1#1: host not found in upstream "cache-proxy" in /etc/nginx/conf.d/default.conf:58
h2-proxy_1     | nginx: [emerg] host not found in upstream "cache-proxy" in /etc/nginx/conf.d/default.conf:58
tlusty_test_h2-proxy_1 exited with code 1
kamilDevguru commented 5 years ago
$ COMPOSE_HTTP_TIME=300 docker-compose up php
tlusty_test_db_1 is up-to-date
Starting tlusty_test_php_1 ... done
Attaching to tlusty_test_php_1
php_1          | Composer could not find a composer.json file in /srv/api
php_1          | To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
tlusty_test_php_1 exited with code 1
gisoftlab commented 5 years ago

Some reason you didn't fetch all files from repository or you have problem with rights to this files on your local machine.

kamilDevguru commented 5 years ago

I can't find usr/src folder or /srv/api folder in your repository.