matt-schwartz/personal-inventory

Docker Deployment: web browsing error

Fabiettus opened this issue · 2 comments

Hi Matt, i have deployed your web app using docker without any changes in config files except the default port number 80 with 8002.
So i ran first setup.sh then docker-compose up -d, but when i try to browse app at 'Host_ip:8002' i have this error:

Warning: require(/var/www/app/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/app/public/index.php on line 8

Fatal error: require(): Failed opening required '/var/www/app/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/app/public/index.php on line 8

File autoload.php is missing.

Any advice?
Thanks, Fabio.

I got this same error and have some more info to provide:

In the Docker app, the "personal-inventory_web_run_b3c899f1dd25" docker exits with 2 errors when I run docker-compose up -d

The error messages are as follows:

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - symfony/flex is locked to version v1.6.2 and an update of this package was not requested.
    - symfony/flex v1.6.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - symfony/flex is locked to version v1.6.2 and an update of this package was not requested.
    - symfony/flex v1.6.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

Hey Fabio,

So, since I was having the same issue, I decided to fix it. You can get a version that works here: #5

If you use git to switch to that branch, delete the docker images you had originally created and then re-run setup.sh and docker-compose up -d it should work properly.