README.md 3.04 KB
Newer Older
1
# Poduptime
2

dmorley's avatar
dmorley committed
3
Poduptime is software to get live stats and data on listed Diaspora and other Pods that support nodeinfo output.
4

dmorley's avatar
dmorley committed
5 6 7 8 9
# To Install:

Environmental items you need (debian based system assumed):

OS Dependencies:
10
```
dmorley's avatar
dmorley committed
11
php7.2 php7.2-curl php7.2-pgsql php-geoip php7.2-cli php7.2-common php7.2-bcmath php7.2-json php7.2-readline php7.2-mbstring php7.2-xml php-cgi git curl postgresql postgresql-contrib dnsutils bind9 npm nodejs composer
12
```
dmorley's avatar
dmorley committed
13 14 15 16
GeoIP needs setup normally with a dat file

Yarn is a separate install: https://yarnpkg.com

17

dmorley's avatar
dmorley committed
18
Clone and setup:
19
```
dmorley's avatar
dmorley committed
20
git clone https://git.feneas.org/diasporg/Poduptime
21
cd Poduptime
dmorley's avatar
dmorley committed
22
yarn install
David Morley's avatar
David Morley committed
23
composer install
dmorley's avatar
dmorley committed
24
cp config.php.example config.php (all fields required)
25
```
26

27 28 29 30 31 32 33 34 35 36 37
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;\""

# update your local line to allow md5 METHOD
sudo nano /etc/postgresql/vx.x/main/pg_hba.conf

# restart postgresql
dmorley's avatar
dmorley committed
38
```
39

dmorley's avatar
dmorley committed
40 41
Import database schema
```
dmorley's avatar
dmorley committed
42
psql -U podupuser podupdb < db/tables.sql
43 44
```

dmorley's avatar
dmorley committed
45 46 47 48 49 50
1. Edit `config.php` to add your DB and file settings
2. Touch add.log in location you configured in config.php
3. Create your backup folder
4. Add a pod and run `db/pull.sh init` 

# To Use:
51

dmorley's avatar
dmorley committed
52 53 54 55 56
run `db/pull.sh` manually or with cron to update your data  
run `db/pull.sh debug` to debug output  
run `db/pull.sh sqldebug` to debug sql  
run `db/pull.sh develop` to run without email alerts to end users  
run `db/pull.sh Check_System_Deleted` to re-check system deleted pods as needed  
57

dmorley's avatar
dmorley committed
58
# To Upgrade:
59 60
```
git pull
dmorley's avatar
dmorley committed
61
yarn install
David Morley's avatar
David Morley committed
62
composer install
dmorley's avatar
dmorley committed
63
psql -U podupuser podupdb < db/migrationXXX.sql (see db/version.md for proper migration versions)
64 65
```

dmorley's avatar
dmorley committed
66
# Status
dmorley's avatar
dmorley committed
67

dmorley's avatar
dmorley committed
68 69
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e4fdde7b4ec34c56a86938d3ba6e3983)](https://www.codacy.com/app/diasporg/Poduptime?utm_source=git.feneas.org&amp;utm_medium=referral&amp;utm_content=diasporg/Poduptime&amp;utm_campaign=Badge_Grade)
[![Build status](https://badge.buildkite.com/2a2d6f9ff932fc359416fff31ee72c3dce703569a801f83af6.svg)](https://buildkite.com/diasporg/poduptime)
dmorley's avatar
dmorley committed
70 71


krishna's avatar
krishna committed
72 73
============================

dmorley's avatar
dmorley committed
74
Source for Diaspora Pod Uptime
David Morley's avatar
1st  
David Morley committed
75

krishna's avatar
krishna committed
76 77
  Poduptime is software to get live stats and data on listed Diaspora Pods.
  Copyright (C) 2011 David Morley
78

krishna's avatar
krishna committed
79 80 81 82
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.
83

krishna's avatar
krishna committed
84 85 86 87
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Affero General Public License for more details.
88

krishna's avatar
krishna committed
89
  You should have received a copy of the GNU Affero General Public License
90
  along with this program.  If not, see <https://www.gnu.org/licenses/>.