24 changed files with 251 additions and 16 deletions
@ -0,0 +1,13 @@ |
|||
http: |
|||
routers: |
|||
collabora: |
|||
rule: "Host(`collabora`)" |
|||
entryPoints: |
|||
- http |
|||
middlewares: |
|||
service: "collabora" |
|||
services: |
|||
collabora: |
|||
loadBalancer: |
|||
servers: |
|||
- url: "http://127.0.0.1:9980" |
|||
@ -0,0 +1,13 @@ |
|||
http: |
|||
routers: |
|||
nextcloud: |
|||
rule: "Host(`nextcloud`)" |
|||
entryPoints: |
|||
- http |
|||
middlewares: |
|||
service: "nextcloud" |
|||
services: |
|||
nextcloud: |
|||
loadBalancer: |
|||
servers: |
|||
- url: "http://127.0.0.1:8080" |
|||
@ -0,0 +1,9 @@ |
|||
variant: fcos |
|||
version: 1.4.0 |
|||
passwd: |
|||
users: |
|||
- name: nextcloud |
|||
uid: 10008 |
|||
gecos: Nextcloud |
|||
home_dir: /var/lib/quadlets/nextcloud |
|||
primary_group: itix-svc |
|||
@ -0,0 +1,9 @@ |
|||
variant: fcos |
|||
version: 1.4.0 |
|||
passwd: |
|||
users: |
|||
- name: postgresql |
|||
uid: 10004 |
|||
gecos: PostgreSQL |
|||
home_dir: /var/lib/quadlets/postgresql |
|||
primary_group: itix-svc |
|||
@ -0,0 +1,23 @@ |
|||
##
|
|||
## Makefile for Traefik quadlet
|
|||
##
|
|||
|
|||
# Traefik quadlet is mapped to the 10001 user (traefik) and 10000 group (itix-svc)
|
|||
PROJECT_UID = 10001 |
|||
PROJECT_GID = 10000 |
|||
|
|||
TOP_LEVEL_DIR := .. |
|||
include $(TOP_LEVEL_DIR)/Makefile.common |
|||
|
|||
$(TARGET_CHROOT)/etc/quadlets/traefik/conf.d: |
|||
install -m 0755 -o $(PROJECT_UID) -g $(PROJECT_GID) -d $@ |
|||
|
|||
$(TARGET_CHROOT)/etc/quadlets/traefik/conf.d/itix-middlewares.yaml $(TARGET_CHROOT)/etc/quadlets/traefik/conf.d/ping.yaml: $(TARGET_CHROOT)/etc/quadlets/traefik/conf.d/%: other/% |
|||
install -m 0644 -o $(PROJECT_UID) -g $(PROJECT_GID) $< $@ |
|||
|
|||
$(TARGET_CHROOT)/etc/quadlets/traefik/itix-admins.txt $(TARGET_CHROOT)/etc/quadlets/traefik/itix-users.txt: $(TARGET_CHROOT)/etc/quadlets/traefik/%: other/% |
|||
install -m 0600 -o $(PROJECT_UID) -g $(PROJECT_GID) $< $@ |
|||
|
|||
install-config: $(TARGET_CHROOT)/etc/quadlets/traefik/conf.d |
|||
|
|||
install-examples: $(TARGET_CHROOT)/etc/quadlets/traefik/conf.d/itix-middlewares.yaml $(TARGET_CHROOT)/etc/quadlets/traefik/itix-admins.txt $(TARGET_CHROOT)/etc/quadlets/traefik/itix-users.txt |
|||
@ -0,0 +1,34 @@ |
|||
api: |
|||
dashboard: true |
|||
debug: false |
|||
ping: |
|||
manualRouting: true |
|||
|
|||
log: |
|||
level: "INFO" |
|||
|
|||
accesslog: false |
|||
|
|||
global: |
|||
sendanonymoususage: false |
|||
checknewversion: false |
|||
|
|||
entryPoints: |
|||
http: |
|||
address: ":80" |
|||
https: |
|||
address: ":443" |
|||
|
|||
certificatesResolvers: |
|||
le: |
|||
acme: |
|||
email: "nicolas.masse@itix.fr" |
|||
keyType: "EC384" |
|||
httpChallenge: |
|||
# used during the challenge |
|||
entryPoint: http |
|||
storage: "/var/lib/traefik/acme.json" |
|||
providers: |
|||
file: |
|||
directory: /etc/traefik/conf.d/ |
|||
watch: true |
|||
@ -0,0 +1,16 @@ |
|||
http: |
|||
middlewares: |
|||
## Password hashes can be generated with: |
|||
# |
|||
# htpasswd -n -B -C 10 <username> |
|||
# |
|||
itix-admins: |
|||
basicAuth: |
|||
realm: "ITIX" |
|||
headerField: "X-WebAuth-User" |
|||
usersFile: "/etc/traefik/itix-admins.txt" |
|||
itix-users: |
|||
basicAuth: |
|||
realm: "ITIX" |
|||
headerField: "X-WebAuth-User" |
|||
usersFile: "/etc/traefik/itix-users.txt" |
|||
@ -0,0 +1,15 @@ |
|||
http: |
|||
routers: |
|||
traefik-ping: |
|||
rule: Host(`ping`) |
|||
entryPoints: |
|||
- http |
|||
service: "ping@internal" |
|||
middlewares: |
|||
- localhost-only |
|||
services: {} |
|||
middlewares: |
|||
localhost-only: |
|||
ipAllowList: |
|||
sourceRange: |
|||
- "127.0.0.1/32" |
|||
@ -0,0 +1,9 @@ |
|||
variant: fcos |
|||
version: 1.4.0 |
|||
passwd: |
|||
users: |
|||
- name: traefik |
|||
uid: 10001 |
|||
gecos: Traefik |
|||
home_dir: /var/lib/quadlets/traefik |
|||
primary_group: itix-svc |
|||
@ -0,0 +1,43 @@ |
|||
[Unit] |
|||
Description=Traefik reverse proxy |
|||
Documentation=https://github.com/traefik/traefik-library-image |
|||
After=local-fs.target network.target |
|||
Before=traefik.target |
|||
|
|||
# Start/stop this unit when the target is started/stopped |
|||
PartOf=traefik.target |
|||
|
|||
[Container] |
|||
ContainerName=traefik |
|||
|
|||
# Image |
|||
Image=docker.io/library/traefik:v3.4 |
|||
AutoUpdate=registry |
|||
|
|||
# No need for root privileges |
|||
User=10001 |
|||
Group=10000 |
|||
AddCapability=CAP_NET_BIND_SERVICE |
|||
|
|||
# Storage |
|||
Volume=/var/lib/quadlets/traefik:/var/lib/traefik:z |
|||
Volume=/etc/quadlets/traefik:/etc/traefik:z |
|||
|
|||
# Network |
|||
Network=host |
|||
|
|||
# Health check |
|||
HealthCmd=wget -q -O /dev/null --header 'Host: ping' http://127.0.0.1/ |
|||
HealthInterval=30s |
|||
HealthTimeout=10s |
|||
HealthStartPeriod=10s |
|||
HealthRetries=3 |
|||
|
|||
[Service] |
|||
Restart=always |
|||
RestartSec=10 |
|||
TimeoutStartSec=120 |
|||
TimeoutStopSec=30 |
|||
|
|||
[Install] |
|||
WantedBy=traefik.target |
|||
@ -0,0 +1,11 @@ |
|||
[Unit] |
|||
Description=PostgreSQL Service Target |
|||
Documentation=man:systemd.target(5) |
|||
Requires=traefik.service |
|||
After=traefik.service |
|||
|
|||
# Allow isolation - can stop/start this target independently |
|||
AllowIsolate=yes |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
|||
Loading…
Reference in new issue