snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.86k stars 3.14k forks source link

docker-compose not working #11306

Open RaphaelHerd opened 2 years ago

RaphaelHerd commented 2 years ago

Debug mode

Describe the bug

when you pull the currently relased version and try to start the application with docker-compose it throws an error.

snipeit | snipeit | Error snipeit | snipeit | Class 'Laravel\Dusk\DuskServiceProvider' not found snipeit | snipeit | at vendor/laravel/framework/src/Illuminate/Foundation/Application.php:745 snipeit | 741▕ @return \Illuminate\Support\ServiceProvider snipeit | 742▕ / snipeit | 743▕ public function resolveProvider($provider)

Reproduction steps

  1. pull master branch or latest release
  2. execute docker-compose build (will work)
  3. execute docker-compose up (will show the error in the logs)

Expected behavior

should start the application

Screenshots

No response

Snipe-IT Version

latest

Operating System

linux

Web Server

like defined in compose file

PHP Version

like defined in compose file

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

snipe commented 2 years ago

Did you run composer install, etc?

Magzter commented 2 years ago

@RaphaelHerd Check that your APP_ENV variable is set to production for docker-compose up to work out of the box.

When booted in local/dev the app requires DuskServiceProvider and the composer file installs composer dependencies with no-dev.

@snipe new to the project, is Dusk legitimately needed? I only see it used in one test which doesn't appear to be passing for me.

As far as solutions go, how about using APP_ENV in the dockerfile to conditionally run composer install with the --no-dev flag only in production? Happy to do this.