Skip to content

Instantly share code, notes, and snippets.

@lvthillo
Created March 20, 2018 19:02
Show Gist options
  • Save lvthillo/edc3d5363c199f6bbaaf233c350011fc to your computer and use it in GitHub Desktop.
Save lvthillo/edc3d5363c199f6bbaaf233c350011fc to your computer and use it in GitHub Desktop.
docker-compose.yaml to deploy a full Ghost - MySQL stack in Docker
version: '3.1'
volumes:
mysql-volume:
ghost-volume
services:
mysql:
image: mysql:5.7
container_name: mysql
volumes:
- mysql-volume:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: db
MYSQL_USER: blog-user
MYSQL_PASSWORD: supersecret
ghost:
build: ./ghost
image: lvthillo/ghost:1.20.0
container_name: ghost
volumes:
- ghost-volume:/var/lib/ghost
restart: always
ports:
- 80:2368
environment:
database__client: mysql
database__connection__host: mysql
database__connection__user: blog-user
database__connection__password: supersecret
database__connection__database: db
depends_on:
- mysql
entrypoint: ["wait-for-it.sh", "mysql", "--", "docker-entrypoint.sh"]
command: ["node", "current/index.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment