Skip to content

Instantly share code, notes, and snippets.

@Jaxmetalmax
Created March 10, 2023 23:25
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 Jaxmetalmax/5103afe33e89b06a3425041a6a9fe6fd to your computer and use it in GitHub Desktop.
Save Jaxmetalmax/5103afe33e89b06a3425041a6a9fe6fd to your computer and use it in GitHub Desktop.
version: '3.1'
services:
ghost:
image: ghost:4-alpine
restart: always
ports:
- 8080:2368
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: exampleuser
database__connection__password: examplepass
database__connection__database: ghostdb
# this url value is just an example, and is likely wrong for your environment!
url: http://localhost:8000
# 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 desire>
#NODE_ENV: development
volumes:
- ./content:/var/lib/ghost/content
db:
image: mysql:8.0
restart: always
environment:
MYSQL_RANDOM_ROOT_PASSWORD: '1'
MYSQL_DATABASE: ghostdb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
volumes:
- db:/var/lib/mysql
volumes:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment