mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
0c56c9bb8f
ref https://linear.app/ghost/issue/ENG-1968/get-browser-tests-working-in-docker - When running browser tests in docker compose, the `stripe listen` command was not outputting the API key from the environment, because it's expecting that you've already run `stripe login` to authenticate with stripe. It only outputs the API key in the command line in CI. - This isn't convenient/practical to do in docker, and it's much easier to supply the API key as an environment variable, so this changes the logic to use the API key from the command line when running in docker _or_ CI.
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
name: ghost
|
|
|
|
services:
|
|
ghost:
|
|
build:
|
|
context: .
|
|
dockerfile: ./.docker/Dockerfile
|
|
target: development
|
|
ports:
|
|
- "2368:2368"
|
|
- "4200:4200"
|
|
profiles: [full]
|
|
volumes:
|
|
- .:/home/ghost
|
|
tty: true
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- mysql
|
|
- redis
|
|
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
|
|
volumes:
|
|
- redis-data:/data
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
|
interval: 1s
|
|
retries: 120
|
|
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:
|
|
redis-data:
|