16 Commits

Author SHA1 Message Date
3wc
5fd556d358 chore: publish 0.5.1+1.9.8 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 19:39:01 +01:00
3wc
4c2417901e Switch to self-hosted stack-ssh-deploy image [mass update]
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-21 11:49:55 -08:00
3wc
6bc2679dee Fix CI by adding networks: [mass update]
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-20 11:58:41 -08:00
3wc
d2d5b8ceb1 Automatically generate catalogue on release [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
Re: coop-cloud/recipes-catalogue-json#4
2023-01-20 10:27:11 -08:00
3wc
afd3b03b21 Update abra syntax in examples (finally) [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 16:02:27 -08:00
b43724ecba Merge pull request 'Add configuration option for maximum note length' (#8) from wolcen/hedgedoc:main into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #8
2022-12-15 20:29:18 +00:00
8e973cbed1 Closing `'s seem not required when indented
Some checks failed
continuous-integration/drone/pr Build is failing
Otherwise, extra `` prints on README display.
2022-12-15 20:10:29 +00:00
7780eb9f13 Bump configuration version 2022-12-15 15:05:13 -05:00
9e88945b9b Corrections to get config updating and effective 2022-12-15 15:05:02 -05:00
6139cff626 Correct link 2022-12-15 14:39:19 -05:00
0c96d5a45f Add config file template for documentMaxLength setting 2022-12-15 14:39:14 -05:00
a896d27542 chore: publish 0.5.0+1.9.6 release
Some checks failed
continuous-integration/drone/push Build is failing
2022-12-02 16:04:10 +01:00
90d5d3fc18 chore: publish 0.4.0+1.9.3 release
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-05 16:58:09 +02:00
b282386419 update oauth envs
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-05 16:50:01 +02:00
980cac71d8 chore: publish 0.3.0+1.9.3 release
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-09 14:46:44 +02:00
d277bd9ac1 add backupbot labels
Some checks failed
continuous-integration/drone/push Build is failing
2022-05-09 14:43:57 +02:00
7 changed files with 53 additions and 22 deletions

View File

@ -3,10 +3,12 @@ kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: decentral1se/stack-ssh-deploy:latest
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: hedgedoc
networks:
- proxy
deploy_key:
from_secret: drone_ssh_swarm_test
generate_secrets: true
@ -22,11 +24,17 @@ trigger:
- main
---
kind: pipeline
name: recipe release
name: generate recipe catalogue
steps:
- name: release a new version
image: thecoopcloud/drone-abra:latest
image: plugins/downstream
settings:
command: recipe hedgedoc release
deploy_key:
from_secret: abra_bot_deploy_key
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -1,26 +1,27 @@
TYPE=codimd
TYPE=hedgedoc
DOMAIN=codimd.example.com
DOMAIN=hedgedoc.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.codimd.example.com`'
#EXTRA_DOMAINS=', `www.hedgedoc.example.com`'
LETS_ENCRYPT_ENV=production
SECRET_DB_PASSWORD_VERSION=v1
COMPOSE_FILE="compose.yml"
# OAuth, see https://hackmd.io/@codimd/codimd-generic-oauth-2
# OAuth, see https://docs.hedgedoc.org/guides/auth/keycloak/
#COMPOSE_FILE="$COMPOSE_FILE:compose.oauth.yml"
#CMD_OAUTH2_PROVIDERNAME="Keycloak"
#CMD_OAUTH2_BASEURL="https://keycloak.example.com/realms/realmname/protocol/openid-connect/"
#CMD_OAUTH2_CLIENT_ID="codimd"
#CMD_OAUTH2_CLIENT_ID="hedgedoc"
#CMD_OAUTH2_AUTHORIZATION_URL="https://keycloak.example.com/auth/realms/realmname/protocol/openid-connect/auth"
#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_USERNAME_ATTR=ocs.data.id
#CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR=ocs.data.display-name
#CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR=ocs.data.email
#CMD_OAUTH2_PROVIDERNAME=Keycloak
#CMD_OAUTH2_SCOPE="openid email profile"
#
#SECRET_OAUTH_KEY_VERSION=v1
@ -40,3 +41,5 @@ COMPOSE_FILE="compose.yml"
# CMD_DEFAULT_PERMISSION=editable
# CMD_EMAIL=true
# CMD_SESSION_LIFE=1209600000
# Only present in config.json (no equivalent env var):
# DOCUMENT_MAX_LENGTH=100000

View File

@ -20,16 +20,15 @@
1. Set up Docker Swarm and [`abra`][abra]
2. Deploy [`coop-cloud/traefik`][compose-traefik]
3. `abra app new hedegedoc`
4. `abra app YOURAPPDOMAIN config` - 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
5. `abra app YOURAPPDOMAIN deploy`
5. `abra app deploy YOURAPPDOMAIN`
6. Create initial user:
```
abra app YOURAPPDOMAIN run app bash
. /docker-entrypoint2.sh -e
bin/manage_users
```
[hedegedoc]: https://github.com/hackmdio/hedegedoc
[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

View File

@ -1,4 +1,4 @@
export ENTRYPOINT_CONF_VERSION=v5
export ENTRYPOINT_CONF_VERSION=v6
abra_backup_app() {
_abra_backup_dir "app:/home/hackmd/app/public/uploads/"

View File

@ -5,7 +5,6 @@ services:
app:
environment:
- CMD_OAUTH2_PROVIDERNAME
- CMD_OAUTH2_BASEURL
- CMD_OAUTH2_CLIENT_ID
- CMD_OAUTH2_CLIENT_SECRET_FILE=/run/secrets/oauth_key
- CMD_OAUTH2_AUTHORIZATION_URL
@ -14,6 +13,7 @@ services:
- CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR
- CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR
- CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR
- CMD_OAUTH2_SCOPE
secrets:
- oauth_key

View File

@ -1,7 +1,7 @@
version: "3.8"
services:
app:
image: quay.io/hedgedoc/hedgedoc:1.9.3
image: quay.io/hedgedoc/hedgedoc:1.9.8
environment:
- CMD_USECDN=false
- CMD_URL_ADDPORT=false
@ -26,6 +26,7 @@ services:
- CMD_DEFAULT_PERMISSION
- CMD_EMAIL
- CMD_SESSION_LIFE
- DOCUMENT_MAX_LENGTH
depends_on:
- db
networks:
@ -40,6 +41,9 @@ services:
- source: entrypoint_conf
target: /docker-entrypoint.sh
mode: 0555
- source: config_json
target: /files/config.json
mode: 0555
deploy:
restart_policy:
condition: on-failure
@ -53,7 +57,7 @@ services:
- "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}"
- coop-cloud.${STACK_NAME}.version=0.2.0+1.9.3
- coop-cloud.${STACK_NAME}.version=0.5.1+1.9.8
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
@ -61,7 +65,7 @@ services:
retries: 10
start_period: 1m
db:
image: postgres:11.15-alpine
image: postgres:11.20-alpine
environment:
- POSTGRES_USER=codimd
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
@ -72,6 +76,12 @@ services:
- db_password
networks:
- internal
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "mkdir -p /tmp/backup/ && PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup/backup.sql"
backupbot.backup.post-hook: "rm -rf /tmp/backup"
backupbot.backup.path: "/tmp/backup/"
volumes:
postgres:
codimd_uploads:
@ -84,6 +94,10 @@ networks:
external: true
internal:
configs:
config_json:
name: ${STACK_NAME}_config_${ENTRYPOINT_CONF_VERSION}
file: config.json.tmpl
template_driver: golang
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl

7
config.json.tmpl Normal file
View File

@ -0,0 +1,7 @@
{
{{ if (env "DOCUMENT_MAX_LENGTH") }}
"production": {
"documentMaxLength": {{ env "DOCUMENT_MAX_LENGTH" }}
}
{{ end }}
}