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.4.tar.gz (3.2 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for deployserver-0.1.4.tar.gz
Algorithm Hash digest
SHA256 acba3743d216795a0b26b85e2bf0f5a38b40608535baff5920ca41bcf61d7155
MD5 e5a0761963aa46598bcac4d66f44a128
BLAKE2b-256 1229ee3a245130376279d16903cb3951de45e688ee693f3fdc604b92cd899376

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