Gotify behind Traefik with docker-compose

What is Gotify?

Gotify is a self-hosted server application for sending and receiving messages. It provides a simple and user-friendly interface that puts users in control of their data. This open source platform provides a REST API for sending messages, websocket connections to subscribe and receive messages, and functionality to manage users, clients, and applications. In addition, it provides an Android client to subscribe to the message stream and create push notifications for recently received messages.

Getting Started

Requirements

To start with Gotify behined the Traefik you need to follow the instructions from the traefik with docker-compose post.

Create your docker-compose.yml

## docker-compose.yml
version: '3.8'

networks:
 default:
   name: "traefik_net"
   external: true

services:
 gotify:
   image: "gotify/server"
   container_name: "demo_gotify"
   hostname: “gotify.localhost”
   environment:
     - “GOTIFY_SERVER_PORT=80”
     - “GOTIFY_SERVER_SSL_PORT=443”
     - “GOTIFY_DEFAULTUSER_NAME=admin”
     - “GOTIFY_DEFAULTUSER_PASS=password.1”
     - “GOTIFY_DATABASE_DIALECT=sqlite3”
     - "GOTIFY_DATABASE_CONNECTION=db/gotify.db"
   volumes:
     - "./db:/app/db"
     - “./data:/app/data”
     - “/etc/timezone:/etc/timezone:ro”
     - "/etc/localtime:/etc/localtime:ro"
   restart: unless-stopped
   labels:
     # traefik
     - "traefik.enable=true"
     - "traefik.docker.network=traefik_net"
     - "traefik.http.routers.demo_portainer.rule=Host(`gotify.localhost`)"
     - "traefik.http.routers.demo_portainer.entrypoints=websecure"
     - "traefik.http.routers.demo_portainer.tls=true"
     - "traefik.http.services.demo_portainer.loadbalancer.server.port=80"

Start your docker-compse.yml

Now you can start your service with:

docker compose up -d

Now you can access the gotify dashbord at https://gotify.localhost.
If you used the sample docker-compose form above you can login with:

User: admin
Password: password.1

you can find the example on my git server.