Compare commits

..

8 Commits

Author SHA1 Message Date
f
92650aa12a feat: serve default robots txt 2025-12-26 13:40:51 -03:00
f
0e38a772e9 feat: anubis open graph cache 2025-12-26 13:29:05 -03:00
f
f469a1a90e doc: readme 2025-12-26 13:23:06 -03:00
f
0d85f97200 fix: traefik complains the network is not set 2025-12-24 19:00:41 -03:00
f
ac33efe73a fix: labels 2025-12-24 18:26:33 -03:00
f
a135d170bb fix: anubis 2025-12-24 16:58:51 -03:00
f
fa7cf3e17b fix: labels 2025-12-24 16:49:37 -03:00
f
d05c81b4d7 feat: anubis 2025-12-24 16:27:05 -03:00
5 changed files with 51 additions and 33 deletions

View File

@ -176,6 +176,12 @@ COMPOSE_FILE="compose.yml"
#COMPOSE_FILE="$COMPOSE_FILE:compose.nextcloud-talk-hpb.yml"
#NEXTCLOUD_TALK_HPB_ENABLED=1
## Iocane
#COMPOSE_FILE="$COMPOSE_FILE:compose.iocane.yml"
#IOCANE_ENABLED=1
## Anubis
#COMPOSE_FILE="$COMPOSE_FILE:compose.anubis.yml"
#ANUBIS_COOKIE_DOMAIN=example.com
#ANUBIS_DOMAIN=anubis.example.com
#ANUBIS_REDIRECT_DOMAINS=
#ANUBIS_OG_PASSTHROUGH=true
#ANUBIS_OG_EXPIRY_TIME=1h
#ANUBIS_OG_CACHE_CONSIDER_HOST=true
#ANUBIS_SERVE_ROBOTS_TXT=true

View File

@ -55,4 +55,17 @@ Letsencrypt DNS challenges.
Access Token, in which case use compose.gandi-personal-access-token.yml.
6. Redeploy Traefik, using e.g. `abra app deploy YOURAPPDOMAIN -f`
## Blocking scrapers with [Anubis](https://anubis.techaro.lol/)
Uncomment the lines on the Anubis section of the configuration. Set
a domain name for the cookies and a domain that will serve Anubis
redirection service. Optionally and for [added
security](https://anubis.techaro.lol/docs/admin/configuration/redirect-domains),
set a list of the domain names for the apps that are going to be
protected.
After deploying these changes, go to each recipe that supports Anubis
and follow the process there. **Enabling Anubis here is not enough for
protection your apps.**
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra

29
compose.anubis.yml Normal file
View File

@ -0,0 +1,29 @@
---
version: "3.8"
services:
app:
deploy:
labels:
- "traefik.http.middlewares.anubis.forwardauth.address=http://anubis:8080/.within.website/x/cmd/anubis/api/check"
anubis:
image: "ghcr.io/techarohq/anubis:v1.24.0"
environment:
BIND: ":8080"
TARGET: " "
REDIRECT_DOMAINS: "${ANUBIS_REDIRECT_DOMAINS}"
COOKIE_DOMAIN: "${ANUBIS_COOKIE_DOMAIN}"
PUBLIC_URL: "https://${ANUBIS_DOMAIN}"
OG_PASSTHROUGH: "${ANUBIS_OG_PASSTHROUGH}"
OG_EXPIRY_TIME: "${ANUBIS_OG_EXPIRY_TIME}"
OG_CACHE_CONSIDER_HOST: "${ANUBIS_OG_CACHE_CONSIDER_HOST}"
SERVE_ROBOTS_TXT: "${ANUBIS_SERVE_ROBOTS_TXT}"
networks:
- proxy
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.anubis.rule=Host(`${ANUBIS_DOMAIN}`)"
- "traefik.http.routers.anubis.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.anubis.entrypoints=web-secure"
- "traefik.http.services.anubis.loadbalancer.server.port=8080"
- "traefik.http.routers.anubis.service=anubis"

View File

@ -1,19 +0,0 @@
version: "3.8"
services:
app:
environment:
- IOCANE_ENABLED
iocane:
image: git.madhouse-project.org/iocaine/iocaine:latest
ports:
- '42069:42069'
environment:
- RUST_LOG=iocaine=warn
labels:
- 'traefik.http.middlewares.iocaine.plugin.iocaine.iocaineHttpUrl=http://iocaine:42069'
- 'traefik.http.middlewares.iocaine.plugin.iocaine.methods=GET,HEAD'
networks:
- internal
#TODO healthcheck for iocane?

View File

@ -42,10 +42,6 @@ entrypoints:
allowEncodedPercent: true
allowEncodedQuestionMark: true
allowEncodedHash: true
{{ if eq (env "IOCANE_ENABLED") "1" }}
middlewares:
- iocane@file
{{ end }}
{{ if eq (env "GITEA_SSH_ENABLED") "1" }}
gitea-ssh:
address: ":2222"
@ -155,10 +151,3 @@ certificatesResolvers:
- "1.1.1.1:53"
- "9.9.9.9:53"
{{ end }}
{{ if eq (env "IOCANE_ENABLED") "1" }}
experimental:
localPlugins:
iocaine:
moduleName: "git.mstar.dev/mstar/traefik-iocaine-middleware"
{{ end }}