inital commit

This commit is contained in:
Raphael Martin 2023-11-25 13:48:56 +01:00
parent 1060fd2465
commit 5156828e2f
5 changed files with 76 additions and 1 deletions

9
.env.sample Normal file
View File

@ -0,0 +1,9 @@
APP_USER=YOURUSER
APP_PASSWORD=YOURPASSWORD
PROJECT_URL=git.localhost
PROJECT_NAME=sample
TRAEFIK_NETWORK=traefik_net
PROJECT_DATA=./data

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.env
data/*

View File

@ -1,2 +1,21 @@
# traefik_gotify
# traefik gotify
### get started
create a .env file
sample .env:
# .env
APP_USER=YOURUSER
APP_PASSWORD=YOURPASSWORD
PROJECT_URL=git.localhost
PROJECT_NAME=sample
# the traefik network you want to use
TRAEFIK_NETWORK=traefik_net
then execute the first time the init script

35
docker-compose.yml Normal file
View File

@ -0,0 +1,35 @@
version: "1"
networks:
default:
name: "${TRAEFIK_NETWORK}"
external: true
services:
gotify:
image: "gotify/server"
container_name: "${PROJECT_NAME}_gotify"
hostname: "${PROJECT_URL}"
restart: "unless-stopped"
environment:
- "GOTIFY_SERVER_PORT=80"
- "GOTIFY_SERVER_SSL_PORT=443"
- "GOTIFY_DEFAULTUSER_NAME=${APP_USER}"
- "GOTIFY_DEFAULTUSER_PASS=${APP_PASSWORD}"
- "GOTIFY_DATABASE_DIALECT=sqlite3"
- "GOTIFY_DATABASE_CONNECTION=db/gotify.db"
volumes:
- "./data/gotify:/app/data"
- "./data/db:/app/db"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
labels:
# Watchtower add to auto update
- "com.centurylinklabs.watchtower.enable=true"
# traefik
- "traefik.enable=true"
- "traefik.docker.network=${TRAEFIK_NETWORK}"
- "traefik.http.routers.${PROJECT_NAME}_gotify.rule=Host(`${PROJECT_URL}`)"
- "traefik.http.routers.${PROJECT_NAME}_gotify.entrypoints=websecure"
- "traefik.http.routers.${PROJECT_NAME}_gotify.tls=true"
- "traefik.http.services.${PROJECT_NAME}_gotify.loadbalancer.server.port=80"

9
init Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
source ./.env
mkdir data
docker network create $TRAEFIK_NETWORK
docker compose up -d