mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
05127ddc5c
ref https://linear.app/ghost/issue/ENG-1782/move-docker-related-files-to-a-better-location-that-githubscripts - The docker files are currently located in `.github/scripts`. This location doesn't make a lot of sense — you wouldn't think to look there unless you already knew they were there. This also requires you to specify the path to the `compose.yml` file whenever running a `docker compose ...` command. - This commit moves the `compose.yml` file to the root of the repo, so you can simply run `docker compose up` and it will automatically find the file in the root, without having to specify `-f .github/scripts/docker-compose.yml`. This is a major win for convenience over the current setup. - It also moves all the related files, including the `Dockerfile` used by the Dev Container setup and configuration files for supporting services into a new `.docker` directory, which is a more logical location, and should be easier to find. - Also updated the current convenience commands in the `package.json` scripts block (`yarn docker:reset` and `yarn docker:down`
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: ghost
|
|
|
|
services:
|
|
mysql:
|
|
image: mysql:8.0.35
|
|
container_name: ghost-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!
|
|
- ./.docker/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-redis
|
|
ports:
|
|
- "6379:6379"
|
|
restart: always
|
|
prometheus:
|
|
profiles: [monitoring]
|
|
image: prom/prometheus:v2.30.3
|
|
container_name: ghost-prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
restart: always
|
|
volumes:
|
|
- ./.docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
|
|
grafana:
|
|
profiles: [monitoring]
|
|
image: grafana/grafana:8.3.0
|
|
container_name: ghost-grafana
|
|
ports:
|
|
- "3000:3000"
|
|
restart: always
|
|
environment:
|
|
- GF_AUTH_ANONYMOUS_ENABLED=true
|
|
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
|
|
volumes:
|
|
- ./.docker/grafana/datasources:/etc/grafana/provisioning/datasources
|
|
- ./.docker/grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml
|
|
- ./.docker/grafana/dashboards:/var/lib/grafana/dashboards
|
|
pushgateway:
|
|
profiles: [monitoring]
|
|
image: prom/pushgateway:v1.6.0
|
|
container_name: ghost-pushgateway
|
|
ports:
|
|
- "9091:9091"
|
|
volumes:
|
|
mysql-data:
|