Commit 78858f6b authored by David Morley's avatar David Morley

add basic how to install this in readme

parent d0688b90
Poduptime [![Build Status](https://secure.travis-ci.org/diasporg/Poduptime.png)](http://travis-ci.org/diasporg/Poduptime)
Poduptime
Dependencies:
php7.0 php7.0-curl php7.0-pgsql php-geoip php7.0-cli php7.0-common php7.0-json php7.0-readline
git
curl
postgresql postgresql-contrib
wget
dnsutils
npm
nodejs nodejs-legacy
To Install:
git clone https://github.com/diasporg/Poduptime.git
cd Poduptime
sudo npm install -g bower
bower install
cp config.php.example config.php
If you need to setup your Postgresql/DB:
sudo adduser podupuser
sudo -u postgres bash -c "psql -c \"CREATE USER podupuser WITH PASSWORD 'MYpassword';\""
sudo -u postgres bash -c "psql -c \"CREATE DATABASE podupdb;\""
sudo -u postgres bash -c "psql -c \"GRANT ALL PRIVILEGES ON DATABASE podupdb TO podupuser;\""
sudo nano /etc/postgresql/vx.x/main/pg_hba.conf
update your local line to allow md5 METHOD
restart postgresql
psql -u podupuser podupdb < db/tables.sql
edit config.php with your DB and file settings
============================
Source for http://podupti.me
......
#facebox {
position: absolute;
top: 0;
left: 0;
z-index: 100;
text-align: left;
}
#facebox .popup .content {
border:3px solid rgba(0,0,0,0);
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:0 0 18px rgba(0,0,0,0.4);
-moz-box-shadow:0 0 18px rgba(0,0,0,0.4);
box-shadow:0 0 18px rgba(0,0,0,0.4);
}
#facebox .content {
display:table;
width: 370px;
padding: 10px;
background: #fff;
-webkit-border-radius:4px;
-moz-border-radius:4px;
border-radius:4px;
}
#facebox .content > p:first-child{
margin-top:0;
}
#facebox .content > p:last-child{
margin-bottom:0;
}
#facebox .close{
position:absolute;
top:5px;
right:5px;
padding:2px;
background:#fff;
}
#facebox .close img{
opacity:0.3;
}
#facebox .close:hover img{
opacity:1.0;
}
#facebox .loading {
text-align: center;
}
#facebox .image {
text-align: center;
}
#facebox img {
border: 0;
margin: 0;
}
#facebox_overlay {
position: fixed;
top: 0px;
left: 0px;
height:100%;
width:100%;
}
.facebox_hide {
z-index:-100;
}
.facebox_overlayBG {
background-color: #000;
z-index: 99;
}
......@@ -37,15 +37,15 @@ CREATE TABLE pods (
uptimelast7 numeric(5,2),
status text,
responsetimelast7 text,
service_facebook booleen,
service_twitter booleen,
service_tumblr booleen,
service_wordpress booleen,
service_facebook boolean,
service_twitter boolean,
service_tumblr boolean,
service_wordpress boolean,
token text,
tokenexpire timestamp,
comment_counts int,
weight int DEFAULT 10,
xmpp booleen,
xmpp boolean,
dateUpdated timestamp DEFAULT current_timestamp,
dateLaststats timestamp DEFAULT current_timestamp,
dateCreated timestamp DEFAULT current_timestamp
......
......@@ -2,7 +2,9 @@
$tt=0;
require_once __DIR__ . '/config.php';
//Cloudflare country code pull
$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"];
$dbh = pg_connect("dbname=$pgdb user=$pguser password=$pgpass");
if (!$dbh) {
die("Error in connection: " . pg_last_error());
......
<?php
//focus map to the users side of the globe
//Cloudflare country code pull
$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"];
$csv = array_map('str_getcsv', file('db/country_latlon.csv'));
foreach ($csv as $cords) {
if ($cords[0] == $country_code) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment