Comments (5)
I think you can at least avoid having to select the server interactively, creating a new task in your deploy.rb:
task :restart_delayed_job do
# Let's say the last server in your servers array is the one that runs delayed_job
set :servers, [fetch(:servers).last]
invoke :'delayed_job:restart'
end
$ mina production deploy
$ mina production restart_delayed_job
You can go a little further and create a bash script deploy.sh
in order to automate the two tasks above:
#!/bin/bash
if [ -z ${1+x} ]
then
echo No stage was specified
else
mina $1 deploy;
mina $1 restart_delayed_job;
fi
$ chmod +x deploy.sh
Then, anytime you want to deploy, you can do:
$ ./deploy.sh production
from mina-multi_server.
The thing is that setting ENV['domain']
is delayed until the last moment, when the commands are sent to the server. This makes not possible to get the domain in a previous moment.
I' ll try to figure out a way to keep the current behavior and still be able to access the domain inside other tasks .
from mina-multi_server.
Due to how Mina works, there is no an easy way to get what you need. Just to know, why do you need to get the server
setting?
from mina-multi_server.
Ok, I need to know the server to run a especific task just to one server. Now, first I run:
mina production deploy
and after:
mina production select delayed_job:restart
It works, but I wish to run in one shot.
No problem, I will figure out how to do It in a other way.
Really thank you for you attention!!!
from mina-multi_server.
Thank you one more time!
from mina-multi_server.
Related Issues (2)
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-multi_server.