added deployment configuration
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
90dd02f804
commit
88d06962fd
16
.drone.yml
Normal file
16
.drone.yml
Normal 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
1
Procfile
Normal file
@ -0,0 +1 @@
|
||||
web: gunicorn --bind 0.0.0.0:8000 --workers=1 --threads=15 heroine.wsgi:application
|
||||
8
deployer.py
Normal file
8
deployer.py
Normal 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()
|
||||
Loading…
Reference in New Issue
Block a user