From 525ed36a5e090de4d7f7be2d8707264047516fb5 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 3 Jun 2026 14:11:58 -0700 Subject: [PATCH] Add working configuration for Ghost! --- .../GhostExample/docker-compose.example.yml | 42 ++++++++++----- Config/GhostExample/example.env | 54 ++++++++++--------- 2 files changed, 58 insertions(+), 38 deletions(-) diff --git a/Config/GhostExample/docker-compose.example.yml b/Config/GhostExample/docker-compose.example.yml index 0bedd48..bf0196d 100644 --- a/Config/GhostExample/docker-compose.example.yml +++ b/Config/GhostExample/docker-compose.example.yml @@ -4,34 +4,50 @@ services: - app: - container_name: ghost-app + ghost-app: + container_name: $APP_NAME image: ghost:bookworm restart: always ports: - - 8068:2368 + - 8368:2368 + depends_on: + ghost-db: + condition: service_healthy environment: # see https://ghost.org/docs/config/#configuration-options database__client: mysql - database__connection__host: db + database__connection__host: $DB_NAME database__connection__user: root - database__connection__password: example - database__connection__database: ghost - # this url value is just an example, and is likely wrong for your environment! - #url: http://localhost:8080 - # contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired) - #NODE_ENV: development + database__connection__password: $DB_ROOT_PASSWORD + database__connection__database: $DB_DATABASE + url: $URL + NODE_ENV: $MODE volumes: - ../../Volumes/Ghost/ghost:/var/lib/ghost/content + deploy: + mode: global + resources: + limits: + cpus: $CPU + memory: $MEM - db: - container_name: ghost-db + ghost-db: + container_name: $DB_NAME image: mariadb:lts restart: always + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] environment: - MYSQL_ROOT_PASSWORD: example + MARIADB_ROOT_PASSWORD: $DB_ROOT_PASSWORD + MARIADB_AUTO_UPGRADE: $DB_AUTO_UPGRADE volumes: - ../../Volumes/Ghost/db:/var/lib/mysql + deploy: + mode: global + resources: + limits: + cpus: $CPU_DB + memory: $MEM_DB volumes: ghost: diff --git a/Config/GhostExample/example.env b/Config/GhostExample/example.env index 6eb3101..9d7cf06 100644 --- a/Config/GhostExample/example.env +++ b/Config/GhostExample/example.env @@ -9,22 +9,26 @@ COMPOSE_BAKE=true ## Ghost ## -# TBD/TODO +APP_NAME=ghost-app + +URL='http://localhost:8368' + +# Controls the Node.js runtime. Null is production. +MODE= +#MODE=development ## End Ghost ## ## Database ## -MARIADB_DATABASE='ghost' +DB_NAME=ghost-db -#MARIADB_USER='db_user' -#MARIADB_PASSWORD='database_password' - -MARIADB_ROOT_PASSWORD='db_root_password' +DB_DATABASE=ghost +DB_ROOT_PASSWORD='db_root_password' # Comment this if you do not want MariaDB to run upgrade scripts on new versions. -MARIADB_AUTO_UPGRADE=1 +DB_AUTO_UPGRADE=1 ## End Database ## @@ -32,27 +36,27 @@ MARIADB_AUTO_UPGRADE=1 ## Performance ## # Standard Minimum -#GHOST_CPU=1.00 -#GHOST_MEM=2.00G -#GHOST_CPU_DB=1.00 -#GHOST_MEM_DB=1.00G +#CPU=0.10 +#MEM=0.50G +#CPU_DB=1.00 +#MEM_DB=1.00G # Standard Recommended -#GHOST_CPU=1.00 -#GHOST_MEM=4.00G -#GHOST_CPU_DB=1.00 -#GHOST_MEM_DB=0.50G +#CPU=1.00 +#MEM=1.00G +#CPU_DB=1.00 +#MEM_DB=0.50G -# Tested Minimum -#GHOST_CPU=0.35 -#GHOST_MEM=0.35G -#GHOST_CPU_DB=0.15 -#GHOST_MEM_DB=0.15G +# Tested Minimum - TBD +#CPU=0.35 +#MEM=0.25G +#CPU_DB=0.15 +#MEM_DB=0.25G -# Tested Recommended -## GHOST_CPU=0.50 -## GHOST_MEM=0.50G -## GHOST_CPU_DB=0.25 -## GHOST_MEM_DB=0.25G +# Tested Recommended - TBD +CPU=0.85 +MEM=0.65G +CPU_DB=0.15 +MEM_DB=0.35G ## End Performance ##