mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Added mysql and redis services
This commit is contained in:
parent
81350bffb2
commit
bb5a36d79d
2 changed files with 30 additions and 2 deletions
|
@ -13,3 +13,31 @@ services:
|
|||
- NODE_ENV=dockerdev
|
||||
- DEBUG=${DEBUG}
|
||||
- APP_FLAGS=${APP_FLAGS}
|
||||
mysql:
|
||||
image: mysql:8.0.35
|
||||
container_name: ghost-full-mysql
|
||||
# We'll need to look into how we can further fine tune the memory usage/performance here
|
||||
command: --innodb-buffer-pool-size=1G --innodb-log-buffer-size=500M --innodb-change-buffer-max-size=50 --innodb-flush-log-at-trx_commit=0 --innodb-flush-method=O_DIRECT
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: ghost
|
||||
restart: always
|
||||
volumes:
|
||||
# Turns out you can drop .sql or .sql.gz files in here, cool!
|
||||
- ./mysql-preload:/docker-entrypoint-initdb.d
|
||||
- mysql-data:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: "mysql -uroot -proot ghost -e 'select 1'"
|
||||
interval: 1s
|
||||
retries: 120
|
||||
redis:
|
||||
image: redis:7.0
|
||||
container_name: ghost-full-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mysql-data:
|
|
@ -6,7 +6,7 @@
|
|||
"database": {
|
||||
"client": "mysql",
|
||||
"connection": {
|
||||
"host": "ghost-mysql",
|
||||
"host": "ghost-full-mysql",
|
||||
"user": "root",
|
||||
"password": "root",
|
||||
"database": "ghost"
|
||||
|
@ -14,7 +14,7 @@
|
|||
},
|
||||
"adapters": {
|
||||
"Redis": {
|
||||
"host": "ghost-redis",
|
||||
"host": "ghost-full-redis",
|
||||
"port": 6379
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue