added deployment configuration
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Josue Gomez 2020-06-27 03:15:46 -06:00
parent 90dd02f804
commit 88d06962fd
3 changed files with 25 additions and 0 deletions

16
.drone.yml Normal file
View File

@ -0,0 +1,16 @@
kind: pipeline
type: docker
name: default
steps:
- name: deploy
image: python:3.7
environment:
TOKEN:
from_secret: token
PROJECT:
from_secret: project
commands:
- pip install requests # required for codedeploy_deploy.py
- git archive -v -o bundle.zip --format=zip HEAD > /dev/null
- python deployer.py

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: gunicorn --bind 0.0.0.0:8000 --workers=1 --threads=15 heroine.wsgi:application

8
deployer.py Normal file
View File

@ -0,0 +1,8 @@
import os
import requests
requests.patch(
f'https://www.cloudsyss.com/api/services/deploy/{os.environ.get("PROJECT")}/' ,
headers={'Authorization': f'Token {os.environ.get("PROJECT")}'},
files={'file_sent': open('bundle.zip', 'rb')}
).json()