Giter VIP home page Giter VIP logo

horizon-issue's People

Contributors

herpaderpaldent avatar

Watchers

 avatar

horizon-issue's Issues

โœ… Solution

Thanks for the effort putting a repeatable repo together for me. That saved me a ton of time.

Your Problem

I believe everything stems from your preference to have Laravel installed within a sub directory. Usually we just have everything in the root directory (see Financial Freedom)

More explanation

You have two .env files

  1. /.env
  2. /example-app/.env

You pass an .env with Docker

volumes:
- ./example-app:/var/www/html:cached
env_file:
- .env

Why it doesn't work

Docker likely processes the command like this:

  1. Pass .env to root
  2. Docker sets your environment variables to the "root" session
  3. As root, the su webuser is executed -- which runs a NEW session (not passing your variables)
  4. Web user runs php artisan horizon with the /example-app/.env file (which defaults to 127.0.0.1)

How to confirm

I was able to get this to work as soon as I updated the /example-app/.env
Screen Shot 2022-04-02 at 08 23 38

โœ… Suggested solution

  • Do not put your Laravel app in a sub-directory. Instead, install it to the parent directory so you're only using one .env file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.