Add working configuration for Ghost!

This commit is contained in:
2026-06-03 14:11:58 -07:00
parent 153efbff54
commit 525ed36a5e
2 changed files with 58 additions and 38 deletions
+29 -13
View File
@@ -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:
+29 -25
View File
@@ -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 ##