Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba679b3e9c | ||
|
|
8966fd7126 | ||
|
|
b8f0677c1b | ||
|
|
4d433bd8ff | ||
|
|
c236531def | ||
|
|
341922a2df | ||
|
|
29534f28fb | ||
|
|
8434c5c914 | ||
|
|
441d2c0006 | ||
|
|
09bf4d54c5 | ||
|
|
5c4b99b407 | ||
|
|
cf34b50e44 | ||
|
|
cd4d4313a4 | ||
|
|
d9351db4fd | ||
|
|
91dba20e43 | ||
|
|
ce0bf52ac8 | ||
|
|
5b7facb3dd | ||
|
|
e090cea765 | ||
|
|
4f811c154b | ||
|
|
f2aabdb356 | ||
|
|
e03a098b30 | ||
|
|
b216682544 | ||
|
|
bf070a6faf | ||
|
|
8732ef3db7 | ||
|
|
2571edfa84 | ||
|
|
5eada4ae65 | ||
|
|
6872e4fcb5 | ||
|
|
63dc460d9a | ||
|
|
5814894b58 | ||
|
|
d32033825a | ||
|
|
b83888ca14 | ||
|
|
c9fc0f6a77 | ||
|
|
afddeceed3 |
@@ -12,6 +12,9 @@ SECRET_SESSION_SECRET_VERSION=v1
|
|||||||
|
|
||||||
COMPOSE_FILE="compose.yml"
|
COMPOSE_FILE="compose.yml"
|
||||||
|
|
||||||
|
# Anubis
|
||||||
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.anubis.yml"
|
||||||
|
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
|
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.postgresql.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.postgresql.yml"
|
||||||
@@ -26,6 +29,7 @@ COMPOSE_FILE="compose.yml"
|
|||||||
#CMD_OAUTH2_TOKEN_URL="https://keycloak.example.com/auth/realms/realmname/protocol/openid-connect/token"
|
#CMD_OAUTH2_TOKEN_URL="https://keycloak.example.com/auth/realms/realmname/protocol/openid-connect/token"
|
||||||
#CMD_OAUTH2_USER_PROFILE_URL="https://keycloak.example.com/auth/realms/realmname/protocol/openid-connect/userinfo"
|
#CMD_OAUTH2_USER_PROFILE_URL="https://keycloak.example.com/auth/realms/realmname/protocol/openid-connect/userinfo"
|
||||||
#CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=ocs.data.id
|
#CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=ocs.data.id
|
||||||
|
#CMD_OAUTH2_USER_PROFILE_ID_ATTR=
|
||||||
#CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name
|
#CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name
|
||||||
#CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email
|
#CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email
|
||||||
#CMD_OAUTH2_PROVIDERNAME=Keycloak
|
#CMD_OAUTH2_PROVIDERNAME=Keycloak
|
||||||
@@ -52,3 +56,4 @@ COMPOSE_FILE="compose.yml"
|
|||||||
# CMD_SESSION_LIFE=1209600000
|
# CMD_SESSION_LIFE=1209600000
|
||||||
# Only present in config.json (no equivalent env var):
|
# Only present in config.json (no equivalent env var):
|
||||||
# DOCUMENT_MAX_LENGTH=100000
|
# DOCUMENT_MAX_LENGTH=100000
|
||||||
|
# CMD_ENABLE_UPLOADS=registered
|
||||||
|
|||||||
@@ -20,15 +20,21 @@
|
|||||||
1. Set up Docker Swarm and [`abra`][abra]
|
1. Set up Docker Swarm and [`abra`][abra]
|
||||||
2. Deploy [`coop-cloud/traefik`][compose-traefik]
|
2. Deploy [`coop-cloud/traefik`][compose-traefik]
|
||||||
3. `abra app new hedgedoc`
|
3. `abra app new hedgedoc`
|
||||||
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
|
4. `abra app config YOURAPPDOMAIN` - be sure to change `DOMAIN` to something that resolves to
|
||||||
your Docker swarm box
|
your Docker swarm box
|
||||||
5. `abra app deploy YOURAPPDOMAIN`
|
5. `abra app deploy YOURAPPDOMAIN`
|
||||||
6. Create initial user:
|
6. Create initial user:
|
||||||
```
|
|
||||||
abra app run YOURAPPDOMAIN app bash
|
```
|
||||||
. /docker-entrypoint.sh -e
|
abra app run YOURAPPDOMAIN app -- bin/manage_users --add admin@ema.il
|
||||||
bin/manage_users
|
```
|
||||||
|
|
||||||
[hedegedoc]: https://github.com/hedgedoc/hedgedoc
|
[hedegedoc]: https://github.com/hedgedoc/hedgedoc
|
||||||
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||||
[compose-traefik]: https://git.autonomic.zone/coop-cloud/traefik
|
[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,2 +1,3 @@
|
|||||||
export ENTRYPOINT_CONF_VERSION=v13
|
export ENTRYPOINT_CONF_VERSION=v13
|
||||||
|
export CONFIG_JSON_VERSION=v1
|
||||||
export PG_BACKUP_VERSION=v1
|
export PG_BACKUP_VERSION=v1
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
deploy:
|
||||||
|
labels:
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname,anubis"
|
||||||
@@ -13,6 +13,7 @@ services:
|
|||||||
- CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR
|
- CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR
|
||||||
- CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR
|
- CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR
|
||||||
- CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR
|
- CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR
|
||||||
|
- CMD_OAUTH2_USER_PROFILE_ID_ATTR
|
||||||
- CMD_OAUTH2_SCOPE
|
- CMD_OAUTH2_SCOPE
|
||||||
secrets:
|
secrets:
|
||||||
- oauth_key
|
- oauth_key
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
secrets:
|
secrets:
|
||||||
- db_password
|
- db_password
|
||||||
db:
|
db:
|
||||||
image: pgautoupgrade/pgautoupgrade:16-alpine
|
image: pgautoupgrade/pgautoupgrade:17-alpine
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=codimd
|
- POSTGRES_USER=codimd
|
||||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||||
|
|||||||
+12
-8
@@ -1,7 +1,7 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: quay.io/hedgedoc/hedgedoc:1.10.3
|
image: quay.io/hedgedoc/hedgedoc:1.11.1
|
||||||
environment:
|
environment:
|
||||||
- CMD_USECDN=false
|
- CMD_USECDN=false
|
||||||
- CMD_URL_ADDPORT=false
|
- CMD_URL_ADDPORT=false
|
||||||
@@ -26,6 +26,7 @@ services:
|
|||||||
- CMD_SESSION_LIFE
|
- CMD_SESSION_LIFE
|
||||||
- CMD_SESSION_SECRET_FILE=/run/secrets/session_secret
|
- CMD_SESSION_SECRET_FILE=/run/secrets/session_secret
|
||||||
- DOCUMENT_MAX_LENGTH
|
- DOCUMENT_MAX_LENGTH
|
||||||
|
- CMD_ENABLE_UPLOADS
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
volumes:
|
volumes:
|
||||||
@@ -45,19 +46,22 @@ services:
|
|||||||
condition: on-failure
|
condition: on-failure
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.swarm.network=proxy"
|
||||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
|
||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
|
- "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}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.scheme=https"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
- "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}.timeout=${TIMEOUT:-120}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=3.0.2+1.10.3"
|
- "coop-cloud.${STACK_NAME}.version=3.1.1+1.11.1"
|
||||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||||
healthcheck:
|
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); } });\""
|
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); } });"'
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
@@ -74,7 +78,7 @@ networks:
|
|||||||
external: true
|
external: true
|
||||||
configs:
|
configs:
|
||||||
config_json:
|
config_json:
|
||||||
name: ${STACK_NAME}_config_${ENTRYPOINT_CONF_VERSION}
|
name: ${STACK_NAME}_config_json_${CONFIG_JSON_VERSION}
|
||||||
file: config.json.tmpl
|
file: config.json.tmpl
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
entrypoint_conf:
|
entrypoint_conf:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Important CVE fixes
|
||||||
Reference in New Issue
Block a user