Skip to content

Instantly share code, notes, and snippets.

@jldeen
Created December 13, 2021 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jldeen/3533d5a63b4f97b0dd478585e04bcbd8 to your computer and use it in GitHub Desktop.
Save jldeen/3533d5a63b4f97b0dd478585e04bcbd8 to your computer and use it in GitHub Desktop.
version: '3.8'
services:
db:
image: mysql:5.7
restart: always
environment:
# Fetching the password from the application settings
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
ghost:
image: jldeen/ghost:latest
depends_on:
- db
restart: always
ports:
- 8080:2368
environment:
# See https://docs.ghost.org/docs/config#section-running-ghost-with-config-env-variables
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: ${DATABASE_ROOT_PASSWORD}
database__connection__database: ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment