Giter Site home page Giter Site logo

Use environment files about cachet HOT 4 CLOSED

cachethq avatar cachethq commented on May 5, 2024
Use environment files

from cachet.

Comments (4)

jbrooksuk avatar jbrooksuk commented on May 5, 2024

The problem with the application key being in the environment is on deploying to Heroku. There is no way to generate it there. I actually use a .env.local.php file when developing locally to set the environment when testing Heroku deployment before I push to master.

Heroku does use an environmental variable for the database settings too, see app/config/heroku/database.php.

If you have any suggestions on this, please make a PR.

from cachet.

Ehesp avatar Ehesp commented on May 5, 2024

I've never used Heroku, but I thought you could apply environment variables in the config file or dashboard from the site, as mention here.

'key' => $_ENV['APP_KEY'],

Then, if you're on Heroku or not you can just add an .env.php file and you're good to go too.

Either way, if someone were to clone and deploy the application as of now, then it would be unsafe if the key didn't change.

If someone can confirm the Heroku environment part, that'd be great.

from cachet.

jbrooksuk avatar jbrooksuk commented on May 5, 2024

Sorry, yes, we could do that, getenv('APP_KEY'). The problem is that the environment variable has to be set within app.json.

What we could do though is (at least for Heroku) add a postdeploy command for php artisan key:generate which will change it in the file.

Locally it won't make a difference so we'd have to advise generating it before deploying Cachet on your servers.

from cachet.

jbrooksuk avatar jbrooksuk commented on May 5, 2024

I've now set Heroku deployment to generate the app key again.

from cachet.

Related Issues (20)

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.