2024-10-24 13:15:08 -05:00
|
|
|
# Base container and services for running Ghost
|
|
|
|
## Intended to be extended by another compose file
|
|
|
|
## e.g. docker compose -f base.compose.yml -f development.compose.yml up
|
|
|
|
## Does not include development dependencies, Ghost code, or any other dependencies
|
2024-11-18 17:15:11 -05:00
|
|
|
name: ghost-devcontainer
|
2024-10-24 13:15:08 -05:00
|
|
|
services:
|
|
|
|
ghost:
|
2024-11-18 17:15:11 -05:00
|
|
|
image: ghost-devcontainer
|
|
|
|
command: ["sleep", "infinity"]
|
2024-10-24 13:15:08 -05:00
|
|
|
build:
|
2024-11-18 17:15:11 -05:00
|
|
|
context: ../
|
|
|
|
dockerfile: .devcontainer/Dockerfile
|
|
|
|
target: base-devcontainer
|
2024-10-24 13:15:08 -05:00
|
|
|
pull_policy: never
|
2024-11-18 17:15:11 -05:00
|
|
|
environment:
|
|
|
|
- DEVCONTAINER=true
|
2024-10-24 13:15:08 -05:00
|
|
|
tty: true
|
|
|
|
depends_on:
|
|
|
|
mysql:
|
|
|
|
condition: service_healthy
|
|
|
|
redis:
|
|
|
|
condition: service_healthy
|
|
|
|
mysql:
|
|
|
|
image: mysql:8.0.35
|
|
|
|
# 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"
|
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: root
|
|
|
|
MYSQL_DATABASE: ghost
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- mysql-data:/var/lib/mysql
|
|
|
|
healthcheck:
|
|
|
|
test: "mysql -uroot -proot ghost -e 'select 1'"
|
|
|
|
interval: 1s
|
|
|
|
retries: 120
|
|
|
|
redis:
|
|
|
|
image: redis:7.0
|
|
|
|
ports:
|
|
|
|
- "6379"
|
|
|
|
restart: always
|
|
|
|
healthcheck:
|
|
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
|
|
interval: 1s
|
|
|
|
retries: 120
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mysql-data:
|