File: README

package info (click to toggle)
diaspora-installer 0.7.6.1+debian1
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye, buster, sid
  • size: 456 kB
  • sloc: sh: 895; makefile: 8
file content (92 lines) | stat: -rw-r--r-- 3,311 bytes parent folder | download | duplicates (2)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
diaspora-installer/diaspora package helps you set up and run a diaspora* pod on
your server. diaspora is a native debian package with all dependencies packaged
in debian where as diaspora-installer downloads diaspora and dependencies from
the internet.

Read wiki.diasporafoundation.org for more information about diaspora*.

This package makes some choices for you.
- postgresql is used as the database server by diaspora-installer and mysql is
used as the database server by diaspora-installer-mysql
- nginx is used as the server (alternatives include apache)

The package is split into diaspora-installer, diaspora-installer-mysql and
diaspora-common, because diaspora-common will contain files that are common to
diaspora-installer and diaspora packages.

diaspora-common
- contains the database configuration and diaspora configuration yml files which
are copied to (/usr/share/diaspora)
- contains the init script (which will be copied to /etc/init.d/diaspora)
- contains diaspora.conf that is used during the setup
- contains other scripts (adduser, grantpriv, explained later)

Installation
===
There's no binary to be built.
The scripts and configuration are copied to the following places.
- diaspora.yml and database.yml are put in /usr/share/diaspora/config
- adduser.sh, grantpriv.sh, set-env-nginx.sh are put in
  /usr/lib/diaspora-common/scripts
- diaspora-common.init becomes the /etc/init.d/diaspora

The "config" file gets run and
- sets all the variables required in /etc/diaspora.conf
- copies nginx.conf.example to /etc/nginx-sites-available/ and symlinks in
  sites-enabled


diaspora-common postinst does the following:
- runs adduser.sh to create 'diaspora' user with no login possible.
- runs grantpriv.sh to set diaspora_production database's owner to diaspora.
  Grants diaspora privilege to create database. And grants all privileges on
  template1 database to diaspora. This database stores permissions and other
  metadata
  
diaspora-installer postinst does the following:
- the download of the actual diaspora code from git.
- copies that to /usr/share/diaspora/
- `bundle install` all gems based on Gemfile
- bundle exec rake db:create db:migrate
- bundle exec rake assets:precompile
- creating and saving secret token
- starting diaspora

You will then be asked to copy ssl certificates and reload nginx

Running
===
/etc/init.d/diaspora {start|stop|status|restart|force-reload}
service diaspora {start|stop|status|restart|force-reload}

Configuration
===
You might want to edit diaspora.yml to make modifications, like integrating
social networks. This file can be found in /etc/diaspora

Later you can restart diaspora service.
sudo systemctl stop diaspora
sudo systemctl start diaspora


Troubleshooting
===

You have to change to /usr/share/diaspora directory, set environment variables
and run commands as diaspora user

cd /usr/share/diaspora
. /etc/diaspora.conf
sudo -u diaspora -E -H bundle exec gem show unicorn

You can check if unicorn is running on port 3000 by running
netstat -ntap | grep 3000

If the diaspora service is not running, check its service log file at
/usr/share/diaspora/log/startscript.log

Update Checklist
===

When updating diasora-installer to a new release, change diaspora_version in
diaspora-common.conf and update sha256sum in sha256sums.