Skip to content

Update Ghost image version and environment variables#732

Open
kadma wants to merge 2 commits intoDokploy:canaryfrom
kadma:Update-Ghost
Open

Update Ghost image version and environment variables#732
kadma wants to merge 2 commits intoDokploy:canaryfrom
kadma:Update-Ghost

Conversation

@kadma
Copy link
Contributor

@kadma kadma commented Feb 28, 2026

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:

Copilot AI review requested due to automatic review settings February 28, 2026 21:52
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 28, 2026
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions
Copy link

github-actions bot commented Feb 28, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
templates ✅ Ready (View Log) Visit Preview e7b6206

@dosubot
Copy link

dosubot bot commented Feb 28, 2026

Related Documentation

1 document(s) may need updating based on files changed in this PR:

Dokploy's Space

copilot-instructions /templates/blob/canary/.github/copilot-instructions.md
View Suggested Changes
@@ -54,9 +54,9 @@
   - Use persistent volumes for data storage (e.g., `- db-data:/var/lib/postgresql/data`). 
   - Services named after folder (e.g., `ghost` service).
 - **template.toml**:
-  - Variables: `[variables] main_domain = "${domain}"`; use helpers for secrets (`${password:64}`, `${base64:32}`).
+  - Variables: `[variables] main_domain = "${domain}"`; use helpers for secrets (e.g., `mysql_root_password = "${password:32}"`).
   - Domains: `[[config.domains]] serviceName = "<service>" port = 80 host = "${main_domain}"` (path="/" optional).
-  - Env: `[[config.env]]` array of "KEY=VALUE" strings, interpolating vars (e.g., "DB_PASSWORD=${db_pass}").
+  - Env: Define environment variables in `[config.env]` section with key-value pairs, interpolating vars (e.g., `[config.env]` followed by `GHOST_HOST="${main_domain}"` and `DATABASE_ROOT_PASSWORD="${mysql_root_password}"`). See `blueprints/ghost/` for reference.
   - **URL Variables**: When environment variables require URLs (e.g., `WEB_URL`, `NEXTAUTH_URL`, `PUBLIC_URL`), **always use HTTP by default** (e.g., `"http://${main_domain}"`). HTTPS should only be used if explicitly required by the application or when using a reverse proxy with SSL termination.
   - Mounts: `[[config.mounts]] filePath = "/etc/config" content = """multi-line\ncontent"""`.
   - JWT helper: `${jwt:secret_var:payload_var}` for auth tokens; payload as JSON string with `exp: ${timestamps:YYYY-MM-DDTHH:mm:ssZ}`.

[Accept] [Decline]

Note: You must be authenticated to accept/decline updates.

How did I do? Any feedback?  Join Discord

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-alpine tag to the pinned 6.19.3-alpine version and updates meta.json accordingly.
  • Introduces a mysql_root_password variable with the ${password:32} generator and exposes it as the DATABASE_ROOT_PASSWORD environment variable, replacing the insecure hardcoded example password 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}"
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
DATABASE_ROOT_PASSWORD="${mysql_root_password}"
MYSQL_ROOT_PASSWORD="${mysql_root_password}"

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +21
@@ -17,9 +17,8 @@ services:
db:
image: mysql:8.0
restart: always

environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_ROOT_PASSWORD: "${DATABASE_ROOT_PASSWORD}"
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants