added healthcheck and release note

This commit is contained in:
val 2025-06-14 15:39:09 +02:00
parent 3c467307fb
commit c885189143
No known key found for this signature in database
GPG Key ID: 650507CF2C02830C
5 changed files with 46 additions and 19 deletions

View File

@ -18,6 +18,5 @@ LETS_ENCRYPT_ENV=production
#MAIL_OPTIONS_AUTH_USER=smtpuser@example.com
## Matrix-Synapse-Redirection
# If you want to use Ghost on a TLD which you want to use as matrix server name as well
# COMPOSE_FILE="$COMPOSE_FILE:compose.matrix.yml"
# MATRIX_DOMAIN=matrix-synapse.example.com

View File

@ -1,17 +1,17 @@
# ghost
Headless Node.js CMS for professional publishing
Node.js CMS for professional publishing (headless possible).
<!-- metadata -->
* **Category**: Apps
* **Status**:
* **Image**:
* **Healthcheck**:
* **Backups**:
* **Email**: Y
* **Tests**:
* **SSO**:
* **Status**: 3, stable
* **Image**: [`ghost`](https://hub.docker.com/_/ghost), 4, upstream
* **Healthcheck**: Yes
* **Backups**: Yes
* **Email**: Yes
* **Tests**: No
* **SSO**: N/A
<!-- endmetadata -->
@ -28,3 +28,8 @@ Headless Node.js CMS for professional publishing
[`abra`]: https://git.coopcloud.tech/coop-cloud/abra
[`coop-cloud/traefik`]: https://git.coopcloud.tech/coop-cloud/traefik
## Further configuration
### Matrix-Synapse configuration
If you want to use Ghost on a top-level-domain which you want to use as matrix server name as well, just uncomment the respective section in `YOURAPPDOMAIN.env` and insert your `MATRIX_DOMAIN`

View File

@ -8,6 +8,7 @@ services:
database__connection__user: root
database__connection__database: ghost
database__connection__password_FILE: /run/secrets/db_password
# database__connection__password_FILE: /run/secrets/db_password
url: https://$DOMAIN
mail__transport: ${MAIL_TRANSPORT}
mail__from: ${MAIL_FROM}
@ -25,8 +26,10 @@ services:
- source: ghost_entrypoint
target: /abra-entrypoint.sh
mode: 0555
command: node current/index.js
command: ["node", "current/index.js"]
entrypoint: /abra-entrypoint.sh
depends_on:
- db
networks:
- proxy
- backend
@ -48,12 +51,12 @@ services:
- "backupbot.backup=true"
- "backupbot.backup.path=/var/lib/ghost/content"
- "coop-cloud.${STACK_NAME}.version=0.1.0+5-alpine"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
healthcheck:
test: ["CMD", "wget", "--header=X-Forwarded-Proto: https", "--spider", "-q", "http://localhost:2368/ghost/api/admin/site"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: mysql:8.0
@ -68,10 +71,17 @@ services:
deploy:
labels:
- "backupbot.backup=true"
- "backupbot.backup.pre-hook=mysqldump -u root -pghost ghost --tab /var/lib/mysql-files/"
- "backupbot.backup.pre-hook=mysqldump -u root -p\"$$(cat /run/secrets/db_password)\" ghost --tab /var/lib/mysql-files/"
- "backupbot.backup.post-hook=rm -rf /var/lib/mysql-files/*"
- "backupbot.backup.path=/var/lib/mysql-files/"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p\"$$(cat /run/secrets/db_password)\""]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
networks:
proxy:
external: true

View File

@ -29,4 +29,4 @@ file_env "database__connection__password"
file_env "mail__options__auth__pass"
# upstream entrypoint https://github.com/docker-library/ghost/blob/master/5/alpine/Dockerfile
/usr/local/bin/docker-entrypoint.sh "$@"
exec /usr/local/bin/docker-entrypoint.sh "$@"

View File

@ -1,4 +1,14 @@
# Attention!!!
There are two things you need to change manually:
1. insert secrets for mysql database and smtp
2. migrate your MySQL database from 5.7 to 8.0
## 1. insert secret
The recipe now includes two secrets: `db_password` and `smtp_password` make sure you change them.
To not break somthing, just insert `ghost` as `db_password` because this was the hard coded password before.
If desired to change the db-password, I recommend to do try it after migrating as I run in some difficult to debug problems doing this.
## 2. migrate your MySQL database from 5.7 to 8.0
Recipe updates MySQL version from 5.7 to 8.0 as it is the only supported version of ghost:
https://ghost.org/docs/faq/supported-databases/
@ -38,4 +48,7 @@ abra app run ghost.dev.local-it.cloud db -t -- mysql -u root -pghost ghost -B --
echo "SET foreign_key_checks=1;" >> ~/.abra/backups/"$APP_URL"_alter_table.sql
# run these alter_table.sql commands
abra app run "$APP_URL" db -t -- mysql -u root -pghost ghost < ~/.abra/backups/"$APP_URL"_alter_table.sql
abra app run "$APP_URL" db -t -- mysql -u root -pghost ghost < ~/.abra/backups/"$APP_URL"_alter_table.sql