parent
2ea2d1a71e
commit
c59f9995ed
6 changed files with 51 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
PROJECT_NAME = 'dokumentor' |
||||||
|
REPO = 'git@bitbucket.org:Air51/dokumentor_dev.git' |
||||||
|
BRANCH = 'develop' |
||||||
@ -0,0 +1,4 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
USER = 'mitri4' |
||||||
|
PASS = '9091324913Dasha' |
||||||
|
HOSTS = ['mitri4.pro:8022'] |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
from deploy.common import * # noqa |
||||||
|
|
||||||
|
USER = 'username' |
||||||
|
PASS = 'password' |
||||||
|
HOSTS = ['domain_name:ssh_port'] |
||||||
|
|
||||||
@ -0,0 +1,30 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
|
||||||
|
from fabric.api import * # noqa |
||||||
|
from deploy.common import BRANCH, PROJECT_NAME |
||||||
|
from deploy.stage import HOSTS, USER, PASS |
||||||
|
|
||||||
|
PROJECT_DIR = f'projects/{PROJECT_NAME}' |
||||||
|
env.user = USER |
||||||
|
env.password = PASS |
||||||
|
env.hosts = HOSTS |
||||||
|
|
||||||
|
|
||||||
|
@task |
||||||
|
def pull(): |
||||||
|
with cd(PROJECT_DIR): |
||||||
|
run(f'git pull origin {BRANCH}') |
||||||
|
|
||||||
|
|
||||||
|
@task |
||||||
|
def docker_update(): |
||||||
|
with cd(PROJECT_DIR): |
||||||
|
run('docker-compose build') |
||||||
|
run('docker-compose down') |
||||||
|
run('docker-compose up -d') |
||||||
|
|
||||||
|
|
||||||
|
@task |
||||||
|
def update(): |
||||||
|
pull() |
||||||
|
docker_update() |
||||||
Loading…
Reference in new issue