coldserver

by briansteffens
7 deployments · 4 still active · last rev. 3 months ago

A cluster server for https://github.com/briansteffens/cold

Compatible with: Arch 2016.09.03
						#!/bin/bash
#
#<UDF name="token" label="The token clients will use to authenticate">
#<UDF name="git_source" label="The cold fork to clone" default="https://github.com/briansteffens/cold">
#<UDF name="git_branch" label="The branch to use" default="master">
 
pacman -Syyu --noconfirm
pacman -S --needed --noconfirm base-devel
pacman -S --noconfirm git python-pip nginx
 
pip install flask
 
cd ~ && git clone $GIT_SOURCE
cd ~/cold && git checkout $GIT_BRANCH
cd ~/cold && make
cd ~/cold && cluster/server.py $TOKEN &
 
cat <<EOF > /etc/nginx/nginx.conf
  events {
    worker_connections 1024;
  }
  http {
    server {
      listen 80;
      location / {
        proxy_pass http://localhost:5000/;
      }
    }
  }
EOF
 
systemctl restart nginx