mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Minimal example config for docker swarm
Currently missing: reverse proxy, since I am using traefik and I do not have it fully working yet with the internal traefik tools.
This commit is contained in:
parent
326a763343
commit
48c1bb5136
47
docker-compose.swarm.minimal.yml
Normal file
47
docker-compose.swarm.minimal.yml
Normal file
|
@ -0,0 +1,47 @@
|
|||
version: '3.4'
|
||||
services:
|
||||
authelia:
|
||||
image: clems4ever/authelia:latest
|
||||
# Used for Docker configs
|
||||
configs:
|
||||
- source: authelia.v3
|
||||
target: /etc/authelia/config.yml
|
||||
uid: '0'
|
||||
gid: '0'
|
||||
mode: 0444
|
||||
environment:
|
||||
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
# Where the authelia volume is to be mounted. Mounted in a subdirectory to host both the users_database and storage at the same time.
|
||||
volumes:
|
||||
- authelia:/etc/authelia/volume
|
||||
networks:
|
||||
- overlay
|
||||
deploy:
|
||||
#Configure Authelia to automatically restart on failure.
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
delay: 5s
|
||||
max_attempts: 3
|
||||
window: 120s
|
||||
# Mode: global would start authelia on all available nodes, replicated limits it to how many replicas are configured.
|
||||
mode: replicated
|
||||
# How many replicas are wanted. Can be any number >0 up to however many nodes are available.
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
|
||||
#The volume for authelia needs to be configured. There are many drivers available. Such as local storage, ceph-rdb, nfs, cifs etc.
|
||||
volumes:
|
||||
authelia:
|
||||
driver: default
|
||||
name: volume-authelia
|
||||
|
||||
networks:
|
||||
overlay:
|
||||
external: true
|
||||
|
||||
# This is needed if Docker configs are being used to provide Authelia with its configuration.
|
||||
configs:
|
||||
authelia:
|
||||
external: true
|
Loading…
Reference in New Issue
Block a user