Comments (10)
Maybe you can set the bundle_bin
variable to add the environment variables:
set :bundle_bin, 'GUSER=xxx GPASS=yyy bundle'
from mina.
May I ask is there a doc for task :env do
? It does not append ENV setting in the command.
I used set :bundle_prefix
to achieve this.
from mina.
Can you believe there is still no environment variable option? Goodness grief! Well, I think we may fork this thang and add an env-var option but until then we are using a big time hack.
We store our variables locally in an .env file
under the settings we put:
# Non-cowboys, don't try this in production.
set :ssh_options, %{export #{File.open(".env").readlines.map(&:chomp).join(" ")}}
You get the gist and can make it pretty yourself. This is one way to Heroku-tize our deploy.
Happy hacking,
Best.
Ted
from mina.
@lulalala thanks, it worked for me!
I set bundle_prefix like this:
set :bundle_prefix, 'env $(cat .env | xargs) bundle exec '
from mina.
I agree, an environment_variables
should be available to provide variables shared across commands while deploying.
from mina.
set :bundle_bin, 'GUSER=xxx GPASS=yyy bundle'
this is OK !!!! Thanks
from mina.
Try:
task :env do
queue %[NAME="hello"]
end
On Oct 30, 2012, at 6:11 PM, Simon COURTOIS [email protected]
wrote:
I agree, an environment_variables should be available to provide variables
shared across commands while deploying.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/65#issuecomment-9900324.
from mina.
As stated earlier, this should work:
task :env do
queue %[NAME="hello"]
end
from mina.
Also, if you want to put it in .bashrc
instead (IMHO a much better idea!), you should export
the variables:
# .bashrc
export NAME="hello"
from mina.
I use Figaro
require 'yaml'
set :var_from_env, -> { YAML.load_file("./config/application.yml")["ENV_VAR"] }
from mina.
Related Issues (20)
- the Italiantranslation is to be corrected HOT 1
- No password was specified in environment variable CODA_PRIVKEY_PASS HOT 2
- PRESUMED ABANDONED ☠️ HOT 2
- Mina version managers plugin HOT 3
- Better support for CLI variables
- Mina Resurrection HOT 2
- Deployment logs HOT 2
- Document supported operating systems and prerequisities
- Add flag to skip cleanup on failed deploy
- [v1.2.4] run(:local) issue HOT 1
- Stuck on Fetching new git commits HOT 2
- Contributing Guide Missing
- master.key HOT 5
- mina 1.2.4: Allow multiple deployments with different `RAILS_ENV` HOT 2
- Adopt to new standard of bundle flags [proposed Label] enhancement
- run(:local) command not found when using execution_mode: :system
- Are we considering port mina to Crystal? HOT 1
- assets:precomile fails, but deploy succeeds HOT 1
- Ugh... not able to fetch new commits HOT 2
- mina init fails with NoMethodError: undefined method `exists?' for File:Class HOT 3
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 mina.