Simple web site for my home server.
- python3-bleach
- python3-django
- python3-django-web-utils
- python3-pil
- python3-tinycss2
- munin
- munin-node
- [libcgi-fast-perl]
- uwsgi
- uwsgi-plugin-python3
adduser --disabled-password --shell /usr/sbin/nologin homesite
cd /opt
git clone --recursive https://github.com/sdiemer/homesite.git
chown -R homesite: /opt/homesite
ln -s /opt/homesite/homesite/scripts/homesite.service /lib/systemd/system/
ln -s /opt/homesite/homesite/scripts/control.py /usr/local/bin/homesite-control
mkdir -p /home/homesite/homesite-data/private
secret_key=$(tr -dc 'a-z0-9!@#$%^&*\-_=+(){}[]' < /dev/urandom | head -c50)
echo "SECRET_KEY = '$secret_key'" >> "/home/homesite/homesite-data/private/settings_override.py"
chown -R homesite: /home/homesite
chmod 700 /home/homesite/homesite-data/private
runuser -u homesite -- python3 /opt/homesite/homesite/manage.py migrate
runuser -u homesite -- python3 /opt/homesite/homesite/manage.py createsuperuser --username admin
touch /var/log/munin/munin-cgi-graph.log
touch /var/log/munin/munin-cgi-html.log
chmod 660 /var/log/munin/munin-cgi-*
chown www-data:homesite /var/log/munin/munin-cgi-*
mkdir -p /var/lib/munin/cgi-tmp/munin-cgi-graph
chmod -R 770 /var/lib/munin/cgi-tmp/munin-cgi-graph
chown -R www-data:homesite /var/lib/munin/cgi-tmp/munin-cgi-graph