Hasnayeen / invobook

Self-hosted app for Time Tracking, Invoice Generation, Project & Client Management, built with Laravel & Filament.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to install dev environment via install.sh script

BBBThunda opened this issue · comments

Hi, I tried running ./install.sh local script per the CONTRIBUTING guide so I could contribute to your project, but I get a number of errors. At the end of it I have 2 docker containers running, (redis and mariadb), but no nginx, so I'm unable to bring up the app in my browser.

With Docker I'd expect this not to matter, but I'm running the script in iTerm2 on Mac OSX 10.14.06

$ ./install.sh local
/usr/local/bin/docker
Docker version 19.03.2, build 6a30dfc

Docker is installed

/usr/local/bin/docker-compose
docker-compose version 1.24.1, build 4667896b

Docker-compose is installed

Password:
Building php
Step 1/9 : FROM php:7.2-fpm
 ---> 1b212482a575
Step 2/9 : LABEL Description="This image is used to setup Goodwork application"
 ---> Using cache
 ---> 2dc1be71d6b5
Step 3/9 : RUN echo "cgi.fix_pathinfo=0;" > /usr/local/etc/php-fpm.d/php.ini
 ---> Using cache
 ---> 5b5986df7683
Step 4/9 : RUN apt-get update && apt-get -y install --no-install-recommends libpng-dev zip unzip git && docker-php-ext-install pdo_mysql gd bcmath
 ---> Using cache
 ---> 8771df29d340
Step 5/9 : RUN git config --global url."https://github.com/".insteadOf git@github.com:
 ---> Using cache
 ---> c9355ced4938
Step 6/9 : RUN git config --global url."https://".insteadOf git://
 ---> Using cache
 ---> 6444d57412eb
Step 7/9 : RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
 ---> Using cache
 ---> 92eebc8099a9
Step 8/9 : COPY . /var/www
 ---> d4a7ba5d2328
Step 9/9 : WORKDIR /var/www
 ---> Running in 281a384827c2
Removing intermediate container 281a384827c2
 ---> 7c822c36516d
Successfully built 7c822c36516d
Successfully tagged goodwork_php:latest
Starting goodwork_db_1    ... done
Starting goodwork_redis_1 ... done
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 163 installs, 0 updates, 0 removals
  - Installing ocramius/package-versions (1.4.0): Downloading (100%)
  - Installing doctrine/event-manager (v1.0.0): Downloading (100%)
  - Installing doctrine/cache (v1.8.0): Downloading (100%)
  - Installing doctrine/dbal (v2.9.2): Downloading (100%)
  - Installing doctrine/inflector (v1.3.0): Downloading (100%)
  - Installing dragonmantank/cron-expression (v2.3.0): Downloading (100%)
  - Installing erusev/parsedown (1.7.3): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.12.0): Downloading (100%)
  - Installing phpoption/phpoption (1.5.0): Downloading (100%)
  - Installing vlucas/phpdotenv (v3.6.0): Downloading (100%)
  - Installing symfony/css-selector (v4.3.5): Downloading (100%)
  - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.12.0): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.12.0): Downloading (100%)
  - Installing symfony/var-dumper (v4.3.5): Downloading (100%)
  - Installing symfony/routing (v4.3.5): Downloading (100%)
  - Installing symfony/process (v4.3.5): Downloading (100%)
  - Installing symfony/polyfill-php73 (v1.12.0): Downloading (100%)
  - Installing symfony/polyfill-intl-idn (v1.12.0): Downloading (100%)
  - Installing symfony/mime (v4.3.5): Downloading (100%)
  - Installing symfony/http-foundation (v4.3.5): Downloading (100%)
  - Installing symfony/event-dispatcher-contracts (v1.1.7): Downloading (100%)
  - Installing symfony/event-dispatcher (v4.3.5): Downloading (100%)
  - Installing psr/log (1.1.0): Downloading (100%)
  - Installing symfony/debug (v4.3.5): Downloading (100%)
  - Installing symfony/http-kernel (v4.3.5): Downloading (100%)
  - Installing symfony/finder (v4.3.5): Downloading (100%)
  - Installing psr/container (1.0.0): Downloading (100%)
  - Installing symfony/service-contracts (v1.1.7): Downloading (100%)
  - Installing symfony/console (v4.3.5): Downloading (100%)
  - Installing symfony/polyfill-iconv (v1.12.0): Downloading (100%)
  - Installing doctrine/lexer (1.1.0): Downloading (100%)
  - Installing egulias/email-validator (2.1.11): Downloading (100%)
  - Installing swiftmailer/swiftmailer (v6.2.1): Downloading (100%)
  - Installing paragonie/random_compat (v9.99.99): Downloading (100%)
  - Installing ramsey/uuid (3.8.0): Downloading (100%)
  - Installing psr/simple-cache (1.0.1): Downloading (100%)
  - Installing opis/closure (3.4.0): Downloading (100%)
  - Installing symfony/translation-contracts (v1.1.7): Downloading (100%)
  - Installing symfony/translation (v4.3.5): Downloading (100%)
  - Installing nesbot/carbon (2.25.2): Downloading (100%)
  - Installing monolog/monolog (2.0.0): Downloading (100%)
  - Installing league/flysystem (1.0.57): Downloading (100%)
  - Installing laravel/framework (v6.3.0): Downloading (100%)
  - Installing fideloper/proxy (4.2.1): Downloading (100%)
  - Installing ralouphie/getallheaders (3.0.3): Downloading (100%)
  - Installing psr/http-message (1.0.1): Downloading (100%)
  - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
  - Installing graham-campbell/guzzle-factory (v3.0.2): Downloading (100%)
  - Installing ifsnop/mysqldump-php (v2.7): Downloading (100%)
  - Installing jakub-onderka/php-console-color (v0.2): Downloading (100%)
  - Installing lab404/laravel-impersonate (1.4.1): Downloading (100%)
  - Installing psr/http-factory (1.0.1): Downloading (100%)
  - Installing zendframework/zend-diactoros (2.1.5): Downloading (100%)
  - Installing symfony/psr-http-message-bridge (v1.2.0): Downloading (100%)
  - Installing phpseclib/phpseclib (2.0.23): Downloading (100%)
  - Installing league/event (2.2.0): Downloading (100%)
  - Installing lcobucci/jwt (3.3.1): Downloading (100%)
  - Installing defuse/php-encryption (v2.2.1): Downloading (100%)
  - Installing league/oauth2-server (7.4.0): Downloading (100%)
  - Installing firebase/php-jwt (v5.0.0): Downloading (100%)
  - Installing laravel/passport (v7.5.1): Downloading (100%)
  - Installing nikic/php-parser (v4.2.4): Downloading (100%)
  - Installing jakub-onderka/php-console-highlighter (v0.4): Downloading (100%)
  - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
  - Installing psy/psysh (v0.9.9): Downloading (100%)
  - Installing laravel/tinker (v1.0.10): Downloading (100%)
  - Installing pda/pheanstalk (v4.0.0): Downloading (100%)
  - Installing predis/predis (v1.1.1): Downloading (100%)
  - Installing spatie/dropbox-api (1.11.0): Downloading (100%)
  - Installing spatie/flysystem-dropbox (1.2.1): Downloading (100%)
  - Installing spatie/temporary-directory (1.2.1): Downloading (100%)
  - Installing spatie/db-dumper (2.14.3): Downloading (100%)
  - Installing spatie/laravel-backup (6.7.1): Downloading (100%)
  - Installing symfony/yaml (v4.3.5): Downloading (100%)
  - Installing sebastian/version (2.0.1): Downloading (100%)
  - Installing sebastian/type (1.1.3): Downloading (100%)
  - Installing sebastian/resource-operations (2.0.1): Downloading (100%)
  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)
  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)
  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)
  - Installing sebastian/global-state (3.0.0): Downloading (100%)
  - Installing sebastian/exporter (3.1.2): Downloading (100%)
  - Installing sebastian/environment (4.2.2): Downloading (100%)
  - Installing sebastian/diff (3.0.2): Downloading (100%)
  - Installing sebastian/comparator (3.0.2): Downloading (100%)
  - Installing phpunit/php-timer (2.1.2): Downloading (100%)
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)
  - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%)
  - Installing theseer/tokenizer (1.1.3): Downloading (100%)
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)
  - Installing phpunit/php-token-stream (3.1.1): Downloading (100%)
  - Installing phpunit/php-code-coverage (7.0.8): Downloading (100%)
  - Installing webmozart/assert (1.5.0): Downloading (100%)
  - Installing phpdocumentor/reflection-common (2.0.0): Downloading (100%)
  - Installing phpdocumentor/type-resolver (1.0.1): Downloading (100%)
  - Installing phpdocumentor/reflection-docblock (4.3.2): Downloading (100%)
  - Installing doctrine/instantiator (1.2.0): Downloading (100%)
  - Installing phpspec/prophecy (1.9.0): Downloading (100%)
  - Installing phar-io/version (2.0.1): Downloading (100%)
  - Installing phar-io/manifest (1.0.3): Downloading (100%)
  - Installing myclabs/deep-copy (1.9.3): Downloading (100%)
  - Installing phpunit/phpunit (8.4.1): Downloading (100%)
  - Installing hassankhan/config (0.11.2): Downloading (100%)
  - Installing codedungeon/php-cli-colors (1.10.7): Downloading (100%)
  - Installing 2bj/phanybar (v1.0.0): Downloading (100%)
  - Installing codedungeon/phpunit-result-printer (0.26.2): Downloading (100%)
  - Installing composer/ca-bundle (1.2.4): Downloading (100%)
  - Installing composer/semver (1.5.0): Downloading (100%)
  - Installing composer/spdx-licenses (1.5.2): Downloading (100%)
  - Installing doctrine/annotations (v1.8.0): Downloading (100%)
  - Installing scrivo/highlight.php (v9.15.10.0): Downloading (100%)
  - Installing filp/whoops (2.5.0): Downloading (100%)
  - Installing facade/ignition-contracts (1.0.0): Downloading (100%)
  - Installing facade/flare-client-php (1.1.1): Downloading (100%)
  - Installing facade/ignition (1.11.2): Downloading (100%)
  - Installing fzaninotto/faker (v1.8.0): Downloading (100%)
  - Installing justinrainbow/json-schema (5.2.9): Downloading (100%)
  - Installing moontoast/math (1.1.2): Downloading (100%)
  - Installing laravel/telescope (v2.1): Downloading (100%)
  - Installing dropbox/dropbox-sdk (v1.1.7): Downloading (100%)
  - Installing league/flysystem-dropbox (1.0.4): Downloading (100%)
  - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%)
  - Installing mockery/mockery (1.2.4): Downloading (100%)
  - Installing nunomaduro/collision (v3.0.1): Downloading (100%)
  - Installing symfony/dependency-injection (v4.3.5): Downloading (100%)
  - Installing symfony/filesystem (v4.3.5): Downloading (100%)
  - Installing symfony/config (v4.3.5): Downloading (100%)
  - Installing nette/utils (v3.0.1): Downloading (100%)
  - Installing nette/finder (v2.5.1): Downloading (100%)
  - Installing symplify/package-builder (v6.1.0): Downloading (100%)
  - Installing squizlabs/php_codesniffer (3.5.1): Downloading (100%)
  - Installing phpstan/phpdoc-parser (0.3.5): Downloading (100%)
  - Installing symfony/stopwatch (v4.3.5): Downloading (100%)
  - Installing symfony/polyfill-php70 (v1.12.0): Downloading (100%)
  - Installing symfony/options-resolver (v4.3.5): Downloading (100%)
  - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%)
  - Installing composer/xdebug-handler (1.3.3): Downloading (100%)
  - Installing friendsofphp/php-cs-fixer (v2.15.3): Downloading (100%)
  - Installing symplify/coding-standard (v6.1.0): Downloading (100%)
  - Installing symfony/var-exporter (v4.3.5): Downloading (100%)
  - Installing psr/cache (1.0.1): Downloading (100%)
  - Installing symfony/cache-contracts (v1.1.7): Downloading (100%)
  - Installing symfony/cache (v4.3.5): Downloading (100%)
  - Installing slevomat/coding-standard (5.0.4): Downloading (100%)
  - Installing nette/robot-loader (v3.2.0): Downloading (100%)
  - Installing jean85/pretty-package-versions (1.2): Downloading (100%)
  - Installing symplify/easy-coding-standard (v6.1.0): Downloading (100%)
  - Installing symfony/http-client-contracts (v1.1.7): Downloading (100%)
  - Installing symfony/http-client (v4.3.5): Downloading (100%)
  - Installing sensiolabs/security-checker (v6.0.2): Downloading (100%)
  - Installing theseer/fdomdocument (1.6.6): Downloading (100%)
  - Installing sebastian/finder-facade (1.2.2): Downloading (100%)
  - Installing phploc/phploc (5.0.0): Downloading (100%)
  - Installing object-calisthenics/phpcs-calisthenics-rules (v3.5.1): Downloading (100%)
  - Installing league/container (3.3.0): Downloading (100%)
  - Installing seld/phar-utils (1.0.1): Downloading (100%)
  - Installing seld/jsonlint (1.7.1): Downloading (100%)
  - Installing composer/composer (1.9.0): Downloading (100%)
  - Installing nunomaduro/phpinsights (v1.9.0): Downloading (100%)
  - Installing wnx/laravel-stats (v2.0.0): Downloading (100%)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher
symfony/http-kernel suggests installing symfony/browser-kit
symfony/console suggests installing symfony/lock
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
swiftmailer/swiftmailer suggests installing ext-intl (Needed to support internationalized email addresses)
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).)
laravel/framework suggests installing ext-memcached (Required to use the memcache cache driver.)
laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers.)
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).)
laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
symfony/psr-http-message-bridge suggests installing nyholm/psr7 (For a super lightweight PSR-7/17 implementation)
phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
spatie/laravel-backup suggests installing laravel/slack-notification-channel (Required for sending notifications via Slack)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
nette/utils suggests installing ext-intl (to use Strings::webalize(), toAscii(), normalize() and compare())
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
composer/composer suggests installing ext-zip (Enabling the zip extension allows you to unzip archives)
Package league/flysystem-dropbox is abandoned, you should avoid using it. Use spatie/flysystem-dropbox instead.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: lab404/laravel-impersonate
Discovered Package: laravel/passport
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: nunomaduro/phpinsights
Discovered Package: spatie/laravel-backup
Discovered Package: wnx/laravel-stats
Package manifest generated successfully.
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Building worker
Step 1/5 : FROM php:7.2-cli
 ---> b34c5ddcf674
Step 2/5 : LABEL Description="This image is part of Goodwork application setup"
 ---> Using cache
 ---> f9fc030123f0
Step 3/5 : RUN apt-get update && apt-get -y install --no-install-recommends mysql-client libzip-dev zlib1g-dev && docker-php-ext-install pdo_mysql bcmath zip
 ---> Running in 3f5023b4ecb3
Get:1 http://security-cdn.debian.org/debian-security buster/updates InRelease [39.1 kB]
Get:4 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [99.9 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7899 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian buster-updates/main amd64 Packages [5792 B]
Fetched 8214 kB in 2s (4045 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-client' has no installation candidate
ERROR: Service 'worker' failed to build: The command '/bin/sh -c apt-get update && apt-get -y install --no-install-recommends mysql-client libzip-dev zlib1g-dev && docker-php-ext-install pdo_mysql bcmath zip' returned a non-zero code: 100
Starting goodwork_redis_1 ... done
Starting goodwork_db_1    ... done
Application key set successfully.
Starting goodwork_db_1    ... done
Starting goodwork_redis_1 ... done
Starting goodwork_redis_1 ... done

> spawn-sync@1.0.15 postinstall /var/www/node_modules/spawn-sync
> node postinstall

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1234 packages from 596 contributors and audited 19857 packages in 81.948s
found 0 vulnerabilities

Starting goodwork_redis_1 ... done
Starting goodwork_db_1    ... done
Nothing to migrate.
Seeding: PermissionTableSeeder
Seeded:  PermissionTableSeeder (0.03 seconds)
Seeding: RoleTableSeeder
Seeded:  RoleTableSeeder (0.02 seconds)
Seeding: AdminUserSeeder

   Illuminate\Database\QueryException  : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admin' for key 'users_username_unique' (SQL: insert into `users` (`name`, `username`, `email`, `active`, `role_id`, `password`, `created_at`, `updated_at`) values (Admin, admin, admin@example.com, 1, 1, $2y$10$l61jJAcIM0MWESAOaFq/c.R2mIYHrrGCi4xP3tedakhguVKt12Som, 2019-10-22 12:18:11, 2019-10-22 12:18:11))

  at /var/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:665
    661|         // If an exception occurs when attempting to run a query, we'll format the error
    662|         // message to include the bindings with SQL, which will make this exception a
    663|         // lot more helpful to the developer instead of just the database's errors.
    664|         catch (Exception $e) {
  > 665|             throw new QueryException(
    666|                 $query, $this->prepareBindings($bindings), $e
    667|             );
    668|         }
    669|

  Exception trace:

  1   Doctrine\DBAL\Driver\PDOException::("SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admin' for key 'users_username_unique'")
      /var/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119

  2   PDOException::("SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admin' for key 'users_username_unique'")
      /var/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117

  Please use the argument -v to see more details.
Starting goodwork_redis_1 ... done
Starting goodwork_db_1    ... done
Encryption keys generated successfully.
Personal access client created successfully.
Client ID: 7
Client secret: O35C4RnBCSb93982B2JUQY0ZhBJadFsMnIB2cnwi
Password grant client created successfully.
Client ID: 8
Client secret: 804Zg6JLAuHJH0cocKlKA0LibmnP65Prkx0VI0rm
Starting goodwork_redis_1 ... done
Starting goodwork_db_1    ... done
Route cache cleared!

   LogicException  : Unable to prepare route [api/settings] for serialization. Uses Closure.

  at /var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php:917
    913|      */
    914|     public function prepareForSerialization()
    915|     {
    916|         if ($this->action['uses'] instanceof Closure) {
  > 917|             throw new LogicException("Unable to prepare route [{$this->uri}] for serialization. Uses Closure.");
    918|         }
    919|
    920|         $this->compileRoute();
    921|

  Exception trace:

  1   Illuminate\Routing\Route::prepareForSerialization()
      /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php:62

  2   Illuminate\Foundation\Console\RouteCacheCommand::handle()
      /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

  Please use the argument -v to see more details.
Starting goodwork_redis_1 ... done
Starting goodwork_db_1    ... done
The [public/storage] directory has been linked.
Updated 1 path from the index

Installation complete.


Your application is running at :
http://localhost:80
$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
c246c51abb5b        redis               "docker-entrypoint.s…"   29 minutes ago      Up 29 minutes       6379/tcp            goodwork_redis_1
a1a8ba99a142        mariadb             "docker-entrypoint.s…"   29 minutes ago      Up 29 minutes       3306/tcp            goodwork_db_1

not sure what is right, but it helped me to change the line in install.sh

COMPOSE run --rm -w /var/www php php artisan migrate --seed
to
COMPOSE run --rm -w /var/www php php artisan migrate:fresh --seed

and
in file docker/worker.Dockerfile change the line

RUN apt-get update && apt-get -y install --no-install-recommends mysql-client libzip-dev zlib1g-dev && docker-php-ext-install pdo_mysql bcmath zip
to
RUN apt-get update && apt-get -y install --no-install-recommends mariadb-client libzip-dev zlib1g-dev && docker-php-ext-install pdo_mysql bcmath zip

@msslava looks like that worked. Thanks for your help!

I made the changes you suggested and also removed all of the sudos I could find because they really shouldn't be necessary. (I think composer install still somehow ran as root though?) I also pruned my docker images to make sure cache wasn't interfering before running ./install.sh local. Everything seems to have worked and I have 5 containers running now and I can bring up the dev site in my browser.

The only exception is something after clearing the route cache is still throwing the same error as before:

Starting goodwork_db_1 ... done
Starting goodwork_redis_1 ... done
Route cache cleared!

   LogicException  : Unable to prepare route [api/settings] for serialization. Uses Closure.

  at /var/www/vendor/laravel/framework/src/Illuminate/Routing/Route.php:917
    913|      */
    914|     public function prepareForSerialization()
    915|     {
    916|         if ($this->action['uses'] instanceof Closure) {
  > 917|             throw new LogicException("Unable to prepare route [{$this->uri}] for serialization. Uses Closure.");
    918|         }
    919|
    920|         $this->compileRoute();
    921|

  Exception trace:

  1   Illuminate\Routing\Route::prepareForSerialization()
      /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php:62

  2   Illuminate\Foundation\Console\RouteCacheCommand::handle()
      /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

  Please use the argument -v to see more details.
Starting goodwork_redis_1 ... done
Starting goodwork_db_1    ... done
The "public/storage" directory already exists.
Updated 1 path from the index

Installation complete.

closing this as looks like the problem solved, also route cache error will not throw any more, a fix has been commited

@Hasnayeen Ok if I post a PR with the install.sh and Dockerfile changes suggested by @msslava? Or are they the way they are for a reason?

@BBBThunda not sure why the first two problem occurs, so need to know definitely what's the problem before adding a solution, so for now keeping those as it is

Regarding adding :fresh to the artisan migrate command - it just skips all of the down methods and rollbacks of the migrate and just runs through the up methods. This is nice for a new environment install, but probably isn't "necessary".

But the 2nd change is because the aptitude package mysql-client doesn't exist for whatever repo is configured on the php:7.2-cli image, so it causes the docker image build to fail.

Step 3/3 : RUN apt-get update && apt-get -y install --no-install-recommends mysql-client libzip-dev zlib1g-dev && docker-php-ext-install pdo_mysql bcmath zip
 ---> Running in 381cc8192ec7
Get:1 http://cdn-fastly.deb.debian.org/debian buster InRelease [122 kB]
Get:2 http://security-cdn.debian.org/debian-security buster/updates InRelease [39.1 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7899 kB]
Get:5 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [99.9 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian buster-updates/main amd64 Packages [5792 B]
Fetched 8214 kB in 2s (4173 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package mysql-client is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-client' has no installation candidate
The command '/bin/sh -c apt-get update && apt-get -y install --no-install-recommends mysql-client libzip-dev zlib1g-dev && docker-php-ext-install pdo_mysql bcmath zip' returned a non-zero code: 100

php:7.2-fpm uses a newer version of Ubuntu that replaced mysql-client with mariadb-client. That's why the fix suggested by @msslava worked. If you were really set on using mysql you could probably use default-mysql-client, but leaving it as-is (mysql-client) is a bad idea because it causes the entire dev docker build to fail.

Someone who is thinking about contributing to your project but isn't familiar with Docker will likely not spend time troubleshooting this.

not sure why mysql-client is missing as I installed it on the same image but if mariadb-client is default now then probably its better to use that

While I'm at it, do you know why the cmd script uses sudo docker-compose instead of just docker-compose? My understanding is using sudo causes all files to be mounted as owned by root

Typical docker workflow I see is to add your user to the docker group and then sudo is not necessary

It seems with commit "Update docker setup" there is now a problem with paths. The script does not find other scripts.

Ok I'll leave that alone for now, thanks.

I updated master and created a branch issue733.

I'll create the PR as soon as I have a chance to test.

using sudo is good practice because adding a user to docker group give it similar privilege to root user which opens up security vulnerability

@msslava yeah your containers need to be rebuild as I moved the docker files to docker folder