Update Ghost image version and environment variables#732
Update Ghost image version and environment variables#732kadma wants to merge 2 commits intoDokploy:canaryfrom
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
|
Related Documentation 1 document(s) may need updating based on files changed in this PR: Dokploy's Space copilot-instructions
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Ghost blogging platform blueprint to the latest version (6.0.0 → 6.19.3) and improves security by replacing the hardcoded plaintext database password (example) with a dynamically generated secure password via the ${password:32} helper.
Changes:
- Bumps the Ghost Docker image from the floating
6-alpinetag to the pinned6.19.3-alpineversion and updatesmeta.jsonaccordingly. - Introduces a
mysql_root_passwordvariable with the${password:32}generator and exposes it as theDATABASE_ROOT_PASSWORDenvironment variable, replacing the insecure hardcodedexamplepassword in both the Ghost and MySQL service configs. - Migrates the env section from the legacy
env = [...]array format to the[config.env]TOML table format.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
meta.json |
Bumps the Ghost version from 6.0.0 to 6.19.3 to match the updated image tag. |
blueprints/ghost/docker-compose.yml |
Pins Ghost image to 6.19.3-alpine and replaces hardcoded example passwords with the DATABASE_ROOT_PASSWORD env var reference. |
blueprints/ghost/template.toml |
Adds mysql_root_password variable with a 32-character generated password, exposes it as DATABASE_ROOT_PASSWORD, and switches to [config.env] table format. |
|
|
||
| [config.env] | ||
| GHOST_HOST="${main_domain}" | ||
| DATABASE_ROOT_PASSWORD="${mysql_root_password}" |
There was a problem hiding this comment.
The environment variable name DATABASE_ROOT_PASSWORD deviates from the established naming convention across all other MySQL-backed blueprints in this repository, which consistently use MYSQL_ROOT_PASSWORD as the env var name (e.g., blueprints/linkstack/template.toml, blueprints/gitea-mysql/template.toml, blueprints/mautic/template.toml).
Using MYSQL_ROOT_PASSWORD instead would align with the codebase convention and would also directly match the expected MySQL environment variable name, eliminating the need for the extra mapping in docker-compose.yml (where MYSQL_ROOT_PASSWORD: "${DATABASE_ROOT_PASSWORD}" maps one name to another). Consider renaming both the TOML variable (mysql_root_password → already used) and the env var key to MYSQL_ROOT_PASSWORD to match the pattern used in all other MySQL blueprints.
| DATABASE_ROOT_PASSWORD="${mysql_root_password}" | |
| MYSQL_ROOT_PASSWORD="${mysql_root_password}" |
blueprints/ghost/docker-compose.yml
Outdated
| @@ -17,9 +17,8 @@ services: | |||
| db: | |||
| image: mysql:8.0 | |||
| restart: always | |||
|
|
|||
| environment: | |||
| MYSQL_ROOT_PASSWORD: example | |||
| MYSQL_ROOT_PASSWORD: "${DATABASE_ROOT_PASSWORD}" | |||
There was a problem hiding this comment.
The env var interpolation uses the name DATABASE_ROOT_PASSWORD, which is inconsistent with the naming convention across all other MySQL blueprints in this repository (all of which use MYSQL_ROOT_PASSWORD directly). The MySQL service's environment key is correctly MYSQL_ROOT_PASSWORD, but the indirection through DATABASE_ROOT_PASSWORD adds an unnecessary layer. If the template env var was renamed to MYSQL_ROOT_PASSWORD (matching the convention in gitea-mysql, linkstack, mautic, etc.), this line could read MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}" which is cleaner and self-consistent.
What is this PR about?
New PR of Ghost
It is updated to the latest version of Ghost, and the DATABASE_ROOT_PASSWORD variable is also added to generate a secure password.
Checklist
Before submitting this PR, please make sure that: