Add Docker Compose configurations for Authentik and Gatus services; create example environment files for both services.

This commit is contained in:
Peter Wood
2025-04-29 16:03:58 -04:00
parent ce9a26d2a4
commit 994715cbf9
5 changed files with 145 additions and 12 deletions

View File

@@ -1,18 +1,18 @@
# Start container
Execute command.
# Docker things
```bash
cd media
docker compose up -d
```
## Useful aliases
Navigate to http://localhost:8080 to access download client's WebUI.
`dcdn`=`docker compose down`
`dcupd`=`docker compose up -d`
`dcpull`=`docker compose pull`
`dsta`=`docker stop $(docker ps -q)`
`dclf`=`docker compose logs -f`
`dxcit`=`docker container exec -it`
`lzd`=`lazydocker`
# View download client logs
## Putting it all together
Open console for the download client and run this command.
Shut it down, pull the latest images, and start it up again:
```bash
tail -f config/qBittorrent/logs/qbittorrent.log
```
`dcdn; dcpull; dcupd`

11
authentik/.env.example Normal file
View File

@@ -0,0 +1,11 @@
PG_PASS=
PG_DB=
PG_USER=
PG_PORT=
AUTHENTIK_SECRET_KEY=
AUTHENTIK_ERROR_REPORTING__ENABLED=
COMPOSE_PORT_HTTP=
COMPOSE_PORT_HTTPS=

89
authentik/compose.yml Normal file
View File

@@ -0,0 +1,89 @@
services:
postgresql:
image: docker.io/library/postgres:16-alpine
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${PG_DB} -U $${PG_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
volumes:
- database:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${PG_PASS:?database password required}
POSTGRES_USER: ${PG_USER:-authentik}
POSTGRES_DB: ${PG_DB:-authentik}
POSTGRES_PORT: ${PG_PORT:-5432}
env_file:
- .env
redis:
image: docker.io/library/redis:alpine
command: --save 60 1 --loglevel warning
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 3s
volumes:
- redis:/data
server:
image: ghcr.io/goauthentik/server:2025.2.0
restart: unless-stopped
command: server
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
volumes:
- ./media:/media
- ./custom-templates:/templates
env_file:
- .env
ports:
- "${COMPOSE_PORT_HTTP:-9000}:9000"
- "${COMPOSE_PORT_HTTPS:-9443}:9443"
depends_on:
postgresql:
condition: service_healthy
redis:
condition: service_healthy
worker:
image: ghcr.io/goauthentik/server:2025.2.0
restart: unless-stopped
command: worker
environment:
AUTHENTIK_REDIS__HOST: redis
AUTHENTIK_POSTGRESQL__HOST: postgresql
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS}
# `user: root` and the docker socket volume are optional.
# See more for the docker socket integration here:
# https://goauthentik.io/docs/outposts/integrations/docker
# Removing `user: root` also prevents the worker from fixing the permissions
# on the mounted folders, so when removing this make sure the folders have the correct UID/GID
# (1000:1000 by default)
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./media:/media
- ./certs:/certs
- ./custom-templates:/templates
env_file:
- .env
depends_on:
postgresql:
condition: service_healthy
redis:
condition: service_healthy
volumes:
database:
driver: local
redis:
driver: local

1
gatus/.env.example Normal file
View File

@@ -0,0 +1 @@
# VARIABLE=value #comment

32
gatus/compose.yaml Normal file
View File

@@ -0,0 +1,32 @@
services:
postgres:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- POSTGRES_DB=gatus
- POSTGRES_USER=gatus
- POSTGRES_PASSWORD=sutagabc123
networks:
- gatus-web
gatus:
image: twinproduction/gatus:latest
restart: always
ports:
- "6060:8080"
environment:
- POSTGRES_USER=gatus
- POSTGRES_PASSWORD=sutagabc123
- POSTGRES_DB=gatus
volumes:
- ./config:/config
networks:
- gatus-web
depends_on:
- postgres
networks:
gatus-web: