Gotify

Gotify#

Gotify is a notification service with a web UI and an Android app.

Via docker-compose#

  1. follow the Docker instructions

  2. create the jobs directories

    mkdir -p /home/jobs/scripts/by-user/root/docker/gotify
    chmod 700 /home/jobs/scripts/by-user/root/docker/gotify
    
  3. create a Docker compose file

    /home/jobs/scripts/by-user/root/docker/gotify/docker-compose.yml#
     1version: '3.7'
     2
     3services:
     4    gotify:
     5        image: gotify/server
     6            ports:
     7                - "127.0.0.1:4001:80"
     8        environment:
     9            - TZ=Europe/Rome
    10        volumes:
    11            - /home/jobs/scripts/by-user/root/docker/gotify/data:/app/data
    
  4. create the data directory

    mkdir /home/jobs/scripts/by-user/root/docker/gotify/data
    
  5. if you are migrating from a non docker version of Gotify, copy the original files with rsync -avAX in /home/jobs/scripts/by-user/root/docker/gotify/data.

    Include the Gotify database (gotify.db) as well

  6. create a Systemd unit file. See also the Docker compose services section

    /home/jobs/services/by-user/root/docker-compose.gotify.service#
     1[Unit]
     2Requires=docker.service
     3Requires=network-online.target
     4After=docker.service
     5After=network-online.target
     6
     7[Service]
     8Type=simple
     9WorkingDirectory=/home/jobs/scripts/by-user/root/docker/gotify
    10
    11ExecStart=/usr/bin/docker-compose up --remove-orphans
    12ExecStop=/usr/bin/docker-compose down --remove-orphans
    13
    14Restart=always
    15
    16[Install]
    17WantedBy=multi-user.target
    
  7. fix the permissions

    chmod 700 -R /home/jobs/services/by-user/root
    
  8. run the deploy script

  9. modify the reverse proxy port of your webserver configuration with 4001