Skip to content

Instantly share code, notes, and snippets.

@jaccon
Created April 18, 2022 01:39
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 jaccon/e70567cfc0c2616f5d8362aaed2e0ec7 to your computer and use it in GitHub Desktop.
Save jaccon/e70567cfc0c2616f5d8362aaed2e0ec7 to your computer and use it in GitHub Desktop.
version: '2'
volumes:
mysql-volume:
ghost-volume:
services:
jc_db:
image: mysql:5.7
container_name: jc_db
ports:
- "8001:3306"
networks:
- "hosting"
volumes:
- ./database:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: yourpassword
MYSQL_DATABASE: db
MYSQL_USER: app
MYSQL_PASSWORD: yourpassword
jc_ghost:
build: ./ghost
image: lvthillo/ghost:3.40.2
container_name: jc_ghost
ports:
- "8002:2368"
networks:
- "hosting"
volumes:
- ./ghost-volume:/var/lib/ghost/content
restart: always
environment:
database__client: mysql
database__connection__host: jc_db
database__connection__user: root
database__connection__password: yourpassword
database__connection__database: db
url: http://localhost:8002
depends_on:
- jc_db
links:
- jc_db:mysql
entrypoint: ["wait-for-it.sh", "mysql", "--", "docker-entrypoint.sh"]
command: ["node", "current/index.js"]
networks:
hosting:
ipam:
config:
- subnet: 172.16.1.0/24
gateway: 172.16.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment