Git Product home page Git Product logo

autoprod's Introduction

autoprod.sh allows you to easily deploy your process on your server in a simple and automatic way using the cron job scheduler.

Installation :

After placing autoprod.sh in your local repository folder, you can use cron as the job scheduler to let this script run automatically.

  • Please check and modify the autoprod.sh because you don't may use supervisor as your process manager but maybe pm2 or another...
  • After that the only thing you have to change is the PROCESS_NAME variable which is the name of your process/git repo
  • You can change the Git folder location too, by default, all your git folders must be in your home/ folder.

Warning : The git repository/folder name need to be the same as the process name to let this script works !

In order to run this script automatically, you'll need Cron which is a job scheduler. (already included in most Linux distros)

  • Run crontab -e in order to enter and modify your crontab file
  • You can run Autoprod every minute like this by adding the following line to the crontab file, just add : * * * * * root sh /home/my_super_cool_repo/autoprod.sh

Once launched, this script will log into /home/my_super_cool_repo/autoprod.log any update from your git remote request.

Tips :

If you git pull from another branch than your master/main branch, you'll have to git pull origin <your_branch> and not just git pull anymore. The PULL variable must be greater than 3 if it's from another branch in the condition.

I may use a different method in the future to know if there is some updates or not. (instead of a simple output line counter)

autoprod's People

Contributors

lotharieslayer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.