aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
blob: 9fe8e2ebbdc19257415bcc01ee0af0c41ac1a8e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# digitigrade

an experimental server for the also-experimental pawpub federated social media
protocol.

## running the server

you should have:

* php >= 8.3 with the `pdo_pgsql` and `sockets` extensions
* composer
* a postgres server, database and user already set up
* a beanstalkd server already running

the basic steps for setup are:

1. run `bin/init` (which will install composer things and update the internal
   version info)
2. edit config.ini as appropriate
3. set up the database with `bin/migrate`
4. run the development server with `bin/devserver <port>`, or set it up with
   fpm in your web server
5. run at least one worker with `bin/worker`
6. create an account for yourself using `bin/newuser`

you can poke around with `bin/shell` which will launch the interactive php
shell and initialise all the composer autoloads and so on

whenever you want to update to the latest version (from git) you should:

1. run `git pull`
2. if there were any changes to composer.json/composer.lock, run
   `composer install` (if you're not sure it can't hurt to run it just in case)
3. run `bin/migrate`
4. hope it works :3

if it looks messed up in your web browser after updating, you should be able
to fix it by force reloading the page once

## policies

digitigrade has a "policy" mechanism that allows you to alter or outright
reject incoming notes/actors/interactions as well as anything created by local
users, according to your needs. there are some built-in policies (such as
`Digitigrade\Policy\BlockInstance` which rejects anything from certain
instances) and you can configure them in `policies.conf.php`.

the default configuration allows you to specify a list of blocked instances in
the file `blocked-instances.txt`, one domain per line

## sample nginx configuration

```nginx
server {
   listen               [::]:443 ssl;
   listen               443 ssl;
   server_name          social.example;
   charset              utf-8;
   root                 /path/to/wherever/you/cloned/this/repo;
   access_log           off;
   error_log            off;
   client_max_body_size 20971520; # or however much you feel like

   location / {
      index           index.php;
      rewrite ^(.*)$  /index.php?requestPath=$1 last;
   }

   location ~ \.php$ {
      fastcgi_index   index.php;
      fastcgi_pass    127.0.0.1:9000; # or wherever your php-fpm is listening
      include         fastcgi.conf;
   }
}
```