Public | Automated Build

Last pushed: 2 months ago
Short Description
Short description is empty for this repo.
Full Description

Varhoo Manager

It's client/server application for manage django, php projects on remote servers. Application supports followin operations:

  • Manage projects, systems
  • Production running due to uwsgi, proxy, appache2
  • Repository SVN, GIT
  • Automation for update project
  • Monitoring remote systems

How to start

Client

How to setup and use system with client - https://github.com/Pajinek/vhm/wiki/Client

Server

Easy way to strat the project is used Docker image (LXC). It is very easy - only run following commands in bash:

docker pull varhoo/vhm-server
docker run -i -t -p 80:8000 varhoo/vhm-server

Detail of docker's image https://registry.hub.docker.com/u/varhoo/vhm-server/

Following steps are for running on the common system:

1) Installation

pip install -r requirements/basic.pip

2) Run server

cd server
python manage.py runserver

3) Run client

cd tools
python vhm_check.py

Default template for uwsgi socket (Python):

<pre>
<uwsgi id="{{id}}">
<wsgi-file>{{root_proc}}/wsgi.py</wsgi-file>
<processes>1</processes>
<chdir>{{root_proc}}</chdir>
<uid>{{uid}}</uid>
<gid>{{gid}}</gid>
<pythonpath>{{root_proc}}</pythonpath>
<limit-as>256</limit-as>
<optimize>0</optimize>
<daemonize>{{root}}log/{{id}}-{{name}}.log</daemonize>
<master/>
<home>/opt/env</home>
<no-orphans/>
<pidfile>{{root}}{{id}}-{{name}}.pid</pidfile>
<socket>0.0.0.0:{{port}}</socket>
</uwsgi>
</pre>

And basic template looks as follows (PHP):

<pre>
<VirtualHost *:80>
ServerAdmin {{ admin_email }}
ServerName {{domain}}
{% for alias in alias_list %}
ServerAlias {{ alias }}
{% endfor %}
DocumentRoot {{root_proc}}
</VirtualHost>
</pre>

Basic apache proxy configuration:

<pre>
<VirtualHost default:443>
ServerAdmin {{ admin_email }}
ServerName {{domain}}
{% for alias in alias_list %}
ServerAlias {{ alias }}
{% endfor %}
ProxyPass / uwsgi://0.0.0.0:{{port}}/
ProxyPassReverse / uwsgi://0.0.0.0:{{port}}/
</VirtualHost>
</pre>

advanced way to configure apache proxy looks following:

<pre>
<VirtualHost *:80>
ServerAdmin {{ admin_email }}
ServerName {{domain}}
{% for alias in alias_list %}
ServerAlias {{ alias }}
{% endfor %}
<Location /media/>
SetHandler None
Order deny,allow
Allow from all
Options -Indexes
</Location>
<Location /static/>
SetHandler None
Order deny,allow
Allow from all
Options -Indexes
</Location>
alias /media/ {{root_proc}}{{media}}
alias /static/ {{root_proc}}{{static}}
ProxyPreserveHost On
ProxyErrorOverride Off
ProxyPass /media !
ProxyPass /static !
ProxyPass / uwsgi://0.0.0.0:{{port}}/
ProxyPassReverse / uwsgi://0.0.0.0:{{port}}/
</VirtualHost>
</pre>

Docker Pull Command
Owner
varhoo
Source Repository