11 Commits

Author SHA1 Message Date
081f2139fa chore: publish 1.2.0+1.10.0 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-01 13:12:13 +02:00
6f15d5f2c7 chore: publish 1.1.0+1.9.9 release
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-16 17:32:26 +02:00
8bc03406a1 Remove legacy backup configuration
by @wolcen
2024-07-16 17:31:57 +02:00
bc8996f558 Correct README re: configuring users
by @wolcen
2024-07-16 17:31:20 +02:00
fcf5bade21 Add basic health check for db container
by @wolcen
2024-07-16 17:29:45 +02:00
3fc480b82b Remove unnecessary mode assignment for config.json @wolcen 2024-07-16 17:29:45 +02:00
f71534e396 fix indentation for backupbot labels 2024-07-16 17:29:45 +02:00
5e815e63a5 Merge pull request 'fix: use new uploads path' (#12) from fix-uploads-volume into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #12
2024-07-16 14:52:03 +00:00
ec98bab9d5 Merge pull request 'Pass -p also in entrypoint' (#14) from entrypoint-fix into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #14
2024-07-16 14:49:28 +00:00
65ec56ac08 add alakazam integration file alaconnect.yml
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-13 17:41:59 +02:00
c727320a31 fix: use new uploads path
Some checks failed
continuous-integration/drone/pr Build is failing
2024-04-23 09:21:38 +02:00
6 changed files with 37 additions and 27 deletions

View File

@ -25,10 +25,10 @@
5. `abra app deploy YOURAPPDOMAIN`
6. Create initial user:
```
abra app YOURAPPDOMAIN run app bash
. /docker-entrypoint2.sh -e
abra app run YOURAPPDOMAIN app bash
. /docker-entrypoint.sh -e
bin/manage_users
[hedegedoc]: https://github.com/hedgedoc/hedgedoc
[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

12
abra.sh
View File

@ -1,13 +1 @@
export ENTRYPOINT_CONF_VERSION=v9
abra_backup_app() {
_abra_backup_dir "app:/home/hackmd/app/public/uploads/"
}
abra_backup_db() {
_abra_backup_postgres "db" "codimd" "codimd" "db_password"
}
abra_backup() {
abra_backup_app && abra_backup_db
}

15
alaconnect.yml Normal file
View File

@ -0,0 +1,15 @@
authentik:
env:
CMD_OAUTH2_USER_PROFILE_URL: https://authentik.example.com/application/o/userinfo/
CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR: preferred_username
CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR: name
CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR: email
CMD_OAUTH2_TOKEN_URL: https://authentik.example.com/application/o/token/
CMD_OAUTH2_AUTHORIZATION_URL: https://authentik.example.com/application/o/authorize/
CMD_OAUTH2_CLIENT_ID: hedgedoc
CMD_OAUTH2_PROVIDERNAME: Authentik
uncomment:
- compose.oauth.yml
- SECRET_OAUTH_KEY_VERSION
shared_secrets:
hedgedoc_secret: oauth_key

View File

@ -1,7 +1,7 @@
version: "3.8"
services:
app:
image: quay.io/hedgedoc/hedgedoc:1.9.9
image: quay.io/hedgedoc/hedgedoc:1.10.0
environment:
- CMD_USECDN=false
- CMD_URL_ADDPORT=false
@ -33,7 +33,7 @@ services:
- proxy
- internal
volumes:
- codimd_uploads:/home/hackmd/app/public/uploads
- codimd_uploads:/hedgedoc/public/uploads
secrets:
- db_password
entrypoint: /docker-entrypoint.sh
@ -43,7 +43,6 @@ services:
mode: 0555
- source: config_json
target: /files/config.json
mode: 0555
deploy:
restart_policy:
condition: on-failure
@ -58,7 +57,7 @@ services:
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
- "coop-cloud.${STACK_NAME}.version=1.0.1+1.9.9"
- "coop-cloud.${STACK_NAME}.version=1.2.0+1.10.0"
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); } });\""
interval: 30s
@ -66,7 +65,7 @@ services:
retries: 10
start_period: 1m
db:
image: postgres:16.1-alpine
image: postgres:16.4-alpine
environment:
- POSTGRES_USER=codimd
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
@ -79,12 +78,19 @@ services:
- internal
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
backupbot.backup.post-hook: "rm -f /var/lib/postgresql/data/backup.sql"
backupbot.backup.path: "/var/lib/postgresql/data/backup.sql"
backupbot.restore: "true"
backupbot.restore.post-hook: "sh -c 'psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} < /var/lib/postgresql/data/backup.sql && rm -f /var/lib/postgresql/data/backup.sql'"
backupbot.backup: "true"
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
backupbot.backup.post-hook: "rm -f /var/lib/postgresql/data/backup.sql"
backupbot.backup.path: "/var/lib/postgresql/data/backup.sql"
backupbot.restore: "true"
backupbot.restore.post-hook: "sh -c 'psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} < /var/lib/postgresql/data/backup.sql && rm -f /var/lib/postgresql/data/backup.sql'"
healthcheck:
test: "pg_isready"
interval: 30s
timeout: 10s
retries: 5
start_period: 1m
volumes:
postgres:
codimd_uploads:

View File

@ -39,7 +39,7 @@ main
export CMD_DB_URL=postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME
# 3wc: `source /docker-entrypoint2.sh -e` to load CMD_DB_URL for CLI scripts
# 3wc: `source /docker-entrypoint.sh -e` to load CMD_DB_URL for CLI scripts
if [ ! "${1-}" == "-e" ]; then
# 3wc: upstream ENTRYPOINT
# https://github.com/hedgedoc/container/blob/master/alpine/Dockerfile

1
release/1.2.0+1.10.0 Normal file
View File

@ -0,0 +1 @@
Fixes security issue: https://github.com/hedgedoc/hedgedoc/security/advisories/GHSA-pjf2-269h-cx7p