Skip to content

Instantly share code, notes, and snippets.

@davidlopezre
Created May 1, 2021 12:03
Show Gist options
  • Save davidlopezre/8d3b234493affc61c8a3b17472878d1c to your computer and use it in GitHub Desktop.
Save davidlopezre/8d3b234493affc61c8a3b17472878d1c to your computer and use it in GitHub Desktop.
Sample Docker Compose file for ghost/mysql
version: '3'
services:
ghost:
image: ghost:1-alpine
container_name: ghost-blog
restart: always
ports:
- 80:2368
environment:
database__client: mysql
database__connection__host: mysql
database__connection__user: root
database__connection__password: P4sSw0rd0!
database__connection__database: ghost
volumes:
- ghost-volume:/var/lib/ghost
depends_on:
- mysql
mysql:
image: mysql:5.7
restart: always
container_name: ghost-db
environment:
MYSQL_ROOT_PASSWORD: P4sSw0rd0!
volumes:
- mysql-volume:/var/lib/mysql
volumes:
ghost-volume:
mysql-volume:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment