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: