commit
8365c1bd5b
6 changed files with 72 additions and 18 deletions
@ -0,0 +1,49 @@ |
||||
variables: |
||||
SERVER_URL: "go.skillbox.ru" |
||||
DOMAIN: "$CI_BUILD_REF_SLUG.$SERVER_URL" |
||||
GIT_DEPTH: "1" |
||||
|
||||
types: |
||||
- deploy_branch |
||||
- deploy_production |
||||
|
||||
deploy_branch: |
||||
stage: deploy_branch |
||||
script: |
||||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' |
||||
- eval $(ssh-agent -s) |
||||
- ssh-add <(echo "$SSH_PRIVATE_KEY") |
||||
- mkdir -p ~/.ssh |
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' |
||||
- ~/.composer/vendor/bin/envoy run deploy --cleanup --branch="$CI_BUILD_REF_SLUG" |
||||
environment: |
||||
name: production |
||||
url: https://go.skillbox.ru |
||||
|
||||
variables: |
||||
GIT_DEPTH: "1" |
||||
|
||||
# when: manual |
||||
only: |
||||
- dev |
||||
- autodeploy |
||||
|
||||
deploy_production: |
||||
stage: deploy_production |
||||
script: |
||||
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' |
||||
- eval $(ssh-agent -s) |
||||
- ssh-add <(echo "$SSH_PRIVATE_KEY") |
||||
- mkdir -p ~/.ssh |
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' |
||||
- ~/.composer/vendor/bin/envoy run deploy --cleanup --branch="$CI_BUILD_REF_SLUG" |
||||
environment: |
||||
name: production |
||||
url: https://go.skillbox.ru |
||||
|
||||
variables: |
||||
GIT_DEPTH: "1" |
||||
|
||||
when: manual |
||||
only: |
||||
- master |
||||
@ -1,7 +0,0 @@ |
||||
import os |
||||
|
||||
from django.core.wsgi import get_wsgi_application |
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.settings") |
||||
|
||||
application = get_wsgi_application() |
||||
Loading…
Reference in new issue