The Studentenportal deployment currently deployed on studentenportal.ch.
There are three Docker containers running, orchestrated using docker-compose:
Other than Docker, only a few things are running on the host directly:
docker exec
team@studentenportal.ch
. Currently, Docker containers can't send mails and
Django uses SMTP directly. It's planned to set up a proper MTA to fix this.To log in to the server behind studentenportal.ch, ssh to
root@studentenportal.ch
. Most services run as the studentenportal
user which
has nologin
as shell, so you'll need to su studentenportal -s /bin/bash
.
All relevant data is in /home/studentenportal
on the server.
~/media
is the Django media folder, mapped to
/srv/www/studentenportal/media
in the nginx
and studentenportal
containers.~/postgres-data
is mapped to /var/lib/postgresql/data
in the postgres
container.~/studentenportal.env
is the docker environment file. It's deployed via
Ansible and needs to set:
~/web
is the studentenportal/web
repository.studentenportal-static
named docker volume and
not mapped to the host.studentenportal-dehydrated
named docker volume and not mapped to the host.This repository contains Ansible configurations to set up the host machine and sets up the certificate inside the Docker container.
The private pass
repository contains passwords needed to run Ansible.
The web
repository contains docker-compose-production.yml
which sets up the
production environment. It uses data from deploy/production/
in the same
repository, including the nginx/dehydrated configuration. This is so that it's
possible to simulate the real deployment locally. Note that the web
repository
sets up nginx with a self-signed snakeoil certificate, which then gets replaced
by a proper one by running dehydrated
via Ansible.`
To deploy the Ansible-part, do the following:
ansible-playbook site.yml
To re-deploy the application docker container, run
./deploy/production/scripts/redeploy.sh
inside the web/
repository on the
server.