README.md 3.05 KB
Newer Older
1
# Poduptime
2

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

5 6 7 8 9
# To Install:

Environmental items you need (debian based system assumed):

OS Dependencies:
10
```
David Morley's avatar
David Morley committed
11
php7.2 php7.2-curl php7.2-pgsql php7.2-bcmath 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
```
13 14 15

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

16

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

26 27 28 29 30 31 32 33 34 35 36
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
37
```
38

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

44 45 46 47 48 49
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:
50

51 52 53 54 55
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  
56
These commands can be combined  
57

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

David Morley's avatar
David Morley committed
66
# Status
67

David Morley's avatar
David Morley 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)
70 71


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

dmorley's avatar
dmorley committed
74
Source for Diaspora Pod Uptime
David Morley's avatar
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/>.