Skip to content

Instantly share code, notes, and snippets.

@hatappo
Last active June 27, 2021 05:57
Show Gist options
  • Save hatappo/c8cf942fde23923fde5af44424164426 to your computer and use it in GitHub Desktop.
Save hatappo/c8cf942fde23923fde5af44424164426 to your computer and use it in GitHub Desktop.
https://hub.docker.com/_/ghost/ の docker-compose.yaml あれこれ
# by default, the Ghost image will use SQLite (and thus requires no separate database container)
# we have used MySQL here merely for demonstration purposes (especially environment-variable-based configuration)
version: '3.1'
services:
ghost:
image: ghost:3-alpine
platform: linux/amd64
restart: always
ports:
- 3001:2368 # 8080 はよく使うので変更した
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
# database__connection__port: 3306
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:3001 # 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
depends_on: # たまにしかDB接続に成功しないので足した。
- db
db:
image: mysql:5.7
platform: linux/amd64
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment