Skip to main content

Deploy your project automatically when git branch was updated.

Project description

Deploy your project automatically when git branch was updated.

Usage

Install deployserver from pip.

$ pip3 install deployserver

To start your first autodeploy daemon you need to create deploy.py script file in your project.

import deployserver


deployserver.init({
    'server_address': 'http://mydomain.com',
    'port': 1234,
    'deploy': 'cd /var/www/myProject; git pull;'
})

Then you need to run this script.

$ python3 deploy.py

If you want to run autodeploy daemon in background, use Screen.

$ screen -dmS deployserver_myProject python3 deploy.py

Screen docs: https://www.gnu.org/software/screen/manual/screen.html

Initial params

For initiation deployserver params dict is required.

server_address : string

Enter a domain name for this server with http protocol.

'server_address': 'http://mydomain.com'
'server_address': 'http://8.8.8.8'
'server_address': 'http://0a1b2c3d.ngrok.io'

port : integer

deployserver will listen this local port.

'port': 2345

deploy : string

Bash commands sequence which should be initiated on branch update.

'deploy': 'cd /var/www/myProject; git pull;'
'deploy': '/var/www/myProject/deploy.sh'

(optional) branch : string

Which branch push event should initiate deploy function.

# default
'branch': 'master'
'branch': 'current-sprint'
'branch': 'ver2'

(optional) uri : string

Callback uri.

# default
'uri': '/callback'
'uri': '/'

Requirements

  • Python >= 3.5

  • aiohttp

  • asyncio

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deployserver-0.1.5.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file deployserver-0.1.5.tar.gz.

File metadata

File hashes

Hashes for deployserver-0.1.5.tar.gz
Algorithm Hash digest
SHA256 39d3e36a836b83cd19b98c9b1c853bd87ab134557b7e7fdcb1d3bdc75caf8b7a
MD5 a5c999479ea167a4da2cc24a660e86b6
BLAKE2b-256 f36bb52894a5725c76545d004da673e04099ade71a86ae3a28418212a724221f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page