Compare commits
14 Commits
forceSsl
...
3.0.7+1.10
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f811c154b | |||
| f2aabdb356 | |||
| e03a098b30 | |||
| b216682544 | |||
| bf070a6faf | |||
| 8732ef3db7 | |||
| 2571edfa84 | |||
| 5eada4ae65 | |||
| 6872e4fcb5 | |||
| 63dc460d9a | |||
| 5814894b58 | |||
| d32033825a | |||
| b83888ca14 | |||
| c9fc0f6a77 |
@ -12,6 +12,9 @@ SECRET_SESSION_SECRET_VERSION=v1
|
||||
|
||||
COMPOSE_FILE="compose.yml"
|
||||
|
||||
# Anubis
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.anubis.yml"
|
||||
|
||||
# PostgreSQL
|
||||
|
||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.postgresql.yml"
|
||||
@ -53,3 +56,4 @@ COMPOSE_FILE="compose.yml"
|
||||
# CMD_SESSION_LIFE=1209600000
|
||||
# Only present in config.json (no equivalent env var):
|
||||
# DOCUMENT_MAX_LENGTH=100000
|
||||
# CMD_ENABLE_UPLOADS=registered
|
||||
|
||||
@ -32,3 +32,9 @@
|
||||
[hedegedoc]: https://github.com/hedgedoc/hedgedoc
|
||||
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||
[compose-traefik]: https://git.autonomic.zone/coop-cloud/traefik
|
||||
|
||||
## Protect Forgejo from scrapers with Anubis
|
||||
|
||||
Uncomment the Anubis compose file from the `.env` file and re-deploy the
|
||||
app. Don't forget to actually [enable Anubis on the Traefik app
|
||||
too](https://recipes.coopcloud.tech/traefik)!
|
||||
|
||||
1
abra.sh
1
abra.sh
@ -1,2 +1,3 @@
|
||||
export ENTRYPOINT_CONF_VERSION=v13
|
||||
export CONFIG_JSON_VERSION=v1
|
||||
export PG_BACKUP_VERSION=v1
|
||||
|
||||
7
compose.anubis.yml
Normal file
7
compose.anubis.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
deploy:
|
||||
labels:
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname,anubis"
|
||||
16
compose.yml
16
compose.yml
@ -1,7 +1,7 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
image: quay.io/hedgedoc/hedgedoc:1.10.3
|
||||
image: quay.io/hedgedoc/hedgedoc:1.10.6
|
||||
environment:
|
||||
- CMD_USECDN=false
|
||||
- CMD_URL_ADDPORT=false
|
||||
@ -26,6 +26,7 @@ services:
|
||||
- CMD_SESSION_LIFE
|
||||
- CMD_SESSION_SECRET_FILE=/run/secrets/session_secret
|
||||
- DOCUMENT_MAX_LENGTH
|
||||
- CMD_ENABLE_UPLOADS
|
||||
networks:
|
||||
- proxy
|
||||
volumes:
|
||||
@ -50,11 +51,14 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.permanent=true"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.regex=^http[s]?://([^/]*)/(.*)"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.replacement=https://${DOMAIN}/$${2}"
|
||||
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.permanent=true"
|
||||
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
||||
- "coop-cloud.${STACK_NAME}.version=3.0.2+1.10.3"
|
||||
- "coop-cloud.${STACK_NAME}.version=3.0.7+1.10.6"
|
||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||
healthcheck:
|
||||
test: "nodejs -e \"http.get('http://localhost:3000', (res) => { console.log('status: ', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } });\""
|
||||
@ -74,7 +78,7 @@ networks:
|
||||
external: true
|
||||
configs:
|
||||
config_json:
|
||||
name: ${STACK_NAME}_config_${ENTRYPOINT_CONF_VERSION}
|
||||
name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION}
|
||||
file: config.json.tmpl
|
||||
template_driver: golang
|
||||
entrypoint_conf:
|
||||
|
||||
Reference in New Issue
Block a user