diff --git a/README.md b/README.md index 76da21c..2167805 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# CodiMD +# Hedgedoc -[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/codimd/status.svg)](https://drone.autonomic.zone/coop-cloud/codimd) +[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/hedegedoc/status.svg)](https://drone.autonomic.zone/coop-cloud/hedegedoc) -[CodiMD][codimd] using Coöp Cloud ♥ +[Hedgedoc][hedegedoc] using Coöp Cloud ♥ * **Category**: Apps * **Status**: ❷💛 -* **Image**: [`hackmdio/hackmd`](https://hub.docker.com/r/hackmdio/hackmd/), ❶💚, upstream +* **Image**: [`quay.io/hedgedoc/hedgedoc:1.8.2`](https://quay.io/hedgedoc/hedgedoc:1.8.2), ❶💚, upstream * **Healthcheck**: Yes * **Backups**: No * **Email**: No @@ -19,7 +19,7 @@ 1. Set up Docker Swarm and [`abra`][abra] 2. Deploy [`coop-cloud/traefik`][compose-traefik] -3. `abra app new codimd` +3. `abra app new hedegedoc` 4. `abra app YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to your Docker swarm box 5. `abra app YOURAPPDOMAIN deploy` @@ -30,6 +30,6 @@ bin/manage_users ``` -[codimd]: https://github.com/hackmdio/codimd +[hedegedoc]: https://github.com/hackmdio/hedegedoc [abra]: https://git.autonomic.zone/autonomic-cooperative/abra [compose-traefik]: https://git.autonomic.zone/coop-cloud/traefik diff --git a/abra.sh b/abra.sh index 7ada02c..413e4e8 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export ENTRYPOINT_CONF_VERSION=v1 +export ENTRYPOINT_CONF_VERSION=v5 abra_backup_app() { _abra_backup_dir "app:/home/hackmd/app/public/uploads/" diff --git a/compose.yml b/compose.yml index dd3152c..89d95c2 100644 --- a/compose.yml +++ b/compose.yml @@ -1,9 +1,13 @@ version: "3.8" services: app: - image: hackmdio/hackmd:2.4.1 + image: quay.io/hedgedoc/hedgedoc:1.8.2 environment: - CMD_USECDN=false + - CMD_URL_ADDPORT=false + - CMD_DOMAIN=$DOMAIN + - CMD_PROTOCOL_USESSL=true + - CMD_HSTS_ENABLE=false - CMD_DB_NAME=codimd - CMD_DB_USER=codimd - CMD_DB_HOST=db @@ -51,7 +55,7 @@ services: - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" - coop-cloud.${STACK_NAME}.app.version=2.4.1-e93929f3 healthcheck: - test: ["CMD", "wget", "-qO", "-", "http://localhost:3000"] + 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 timeout: 10s retries: 10 diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index 430946b..b0874ea 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -34,13 +34,13 @@ main() { main -export CMD_DB_URL=postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST/$CMD_DB_NAME +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 if [ ! "${1-}" == "-e" ]; then # 3wc: upstream ENTRYPOINT - # https://github.com/hackmdio/codimd/blob/develop/deployments/Dockerfile - /home/hackmd/app/docker-entrypoint.sh + # https://github.com/hedgedoc/container/blob/master/alpine/Dockerfile + /usr/local/bin/docker-entrypoint.sh npm start fi set +eu