Giter Site home page Giter Site logo

How to specify environment? about foreman HOT 6 CLOSED

ddollar avatar ddollar commented on May 29, 2024
How to specify environment?

from foreman.

Comments (6)

ddollar avatar ddollar commented on May 29, 2024 1

0.16.0 adds a feature to specify the environment

foreman start -e .env

.env should be shell-formatted

FOO=bar
FRED=barney

If no file is specified, it will default to looking for a file called .env in the current directory.

from foreman.

stoplion avatar stoplion commented on May 29, 2024 1

For commands that need to override variables in .env is is possible to set them inline. For example in the case @chrishough points out above RAILS_ENV=development.

RAILS_ENV=test bundle exec foreman start
always runs in development for me

from foreman.

deepthawtz avatar deepthawtz commented on May 29, 2024

I love the idea of Procfile. You are on to something here.

To run with this environment idea and share some thoughts, it would be nice to have an environment-specific way of controlling what runs (perhaps arbitrary named envrionments).

Also have you thought of using ruby for the Procfile? That would allow for some cool stuff:

# Procfile
env :simple do
  proc :web, "./script/server thin"
  proc :worker, "QUEUE=critical,high bundle exec rake resque:work"
end

# then some way to inherit from :simple
env :complex => :simple do
  proc :memcached, "memcached -vv"
  # more stuff ...
end

then

$ foreman start [env]

from foreman.

clifff avatar clifff commented on May 29, 2024

Awesome, this is a great addition. Thanks!

from foreman.

 avatar commented on May 29, 2024

Fantastic, heroku@home.

from foreman.

chrishough avatar chrishough commented on May 29, 2024

has anyone got this to work with RAILS_ENV=development ?

from foreman.

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.