add deploy script
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
from fabric.api import *
|
||||||
|
|
||||||
|
env.user = 'ubuntu'
|
||||||
|
|
||||||
|
env.hosts = (
|
||||||
|
'ec2-52-50-223-159.eu-west-1.compute.amazonaws.com',
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def deploy():
|
||||||
|
local('git archive --format tar.gz -o /tmp/api.tar.gz master', capture=False)
|
||||||
|
put('/tmp/api.tar.gz', '/tmp/api.tar.gz')
|
||||||
|
with cd('/srv/api'):
|
||||||
|
run('tar xzf /tmp/api.tar.gz')
|
||||||
|
run('rm /tmp/api.tar.gz')
|
||||||
|
sudo('service api-uwsgi restart')
|
||||||
|
local('rm /tmp/api.tar.gz')
|
||||||
Reference in New Issue
Block a user