Comments (8)
@joeyespo FWIW reading the PORT
from .env
is done on #45 making it -p flag
, .env file
, default of 5000
.
from forego.
Looks like you're right. Would you be interested in trying to put together a pull request to correct this?
from forego.
Actually looks like this is covered by #45
from forego.
Nice!
from forego.
Ok, just tested it with the latest build.
#45 did fix the .env problem, but the order is still wrong. Here's the updated order:
- Foreman's port precedence is
-p option
,.env file
,PORT variable
,default of 5000
- Forego's port precedence is
PORT variable
,-p option
,.env file
,default of 5000
Put another way, if PORT
just so happens to be in your ENV for another reason, you can't override it using .env
or even -p
.
from forego.
@joeyespo I just tested this and the order seems to be:
-p
flagPORT
variable in the.env
file- Default
5000
port.
Here's what I have:
.env
PORT=6000
Procfile
test: ruby test.rb
test.rb
puts ENV['PORT'].inspect
Running:
1: forego start -p 4000
forego | starting test.1 on port 4000
test.1 | "4000"
forego start
forego | starting test.1 on port 6000
test.1 | "6000"
- (After removing the
.env
file)forego start
forego | starting test.1 on port 5000
test.1 | "5000"
The thing that seems to be missing in #45 is to read directly from the environment.
from forego.
The precedence that makes the most sense to me is:
-p
optionPORT
in.env
PORT
environment variable- 5000
Anyone up for creating a pull request to get forego in line with this?
from forego.
I can add that, after @sergiobuj PR, only the PORT
environment variable is missing.
from forego.
Related Issues (20)
- Latest forego version immediately crashes for rails / node app HOT 3
- PORT env var dependent on the position in the Procfile HOT 2
- forego only extend the first shell variable on the right side of the equal sign in .env file
- Forego adds sleeping bash process for every application (read from .profile) HOT 2
- How to pause or stop a process ?
- Windows Ubuntu
- does not pass on signal to children
- npm script hangs on Windows with "Terminate batch job (Y/N)?" prompt
- Forego i386 binary? HOT 2
- Could you create a new version tag which is compatible with go modules? HOT 1
- Official Forego Docker image
- "forego start" exits immediately with doing nothing on macOS HOT 2
- equinox.io shutting down, publish builds elsewhere? HOT 3
- Download page missing HOT 2
- Prevent environment variables from being overriden?
- request a new release HOT 1
- Immediate exit when using reflex OSX HOT 3
- forego exit In osx HOT 1
- child process doesn't exit in osx HOT 1
- Restart crashed processes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forego.