0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
ghost/compose.yml
Chris Raible 1b2e121165
Fixed flaky browser tests for scheduling posts (#22122)
no issue

- The browser tests for scheduling posts were flaking/failing because
the time was set to `00:00`, which is invalid and should reset the time
to "a few seconds from now", but the test was sometimes able to
"Continue" before the validation logic could run on blur. This left the
actual scheduled time set to `00:00`, which then caused the following
assertions to fail.
- I've tried to replicate this race condition manually to confirm it's
not a bug that a user could actually reach, but I haven't been able to.
I suspect that playwright's `.fill()` and/or `.click()` method behave
slightly differently than expected, which creates this race condition.
2025-02-05 19:56:07 -08:00

100 lines
2.9 KiB
YAML

name: ghost
services:
ghost:
build:
context: .
dockerfile: ./.docker/Dockerfile
target: development
ports:
- "2368:2368" # Ghost
- "4200:4200" # Admin
- "4201:4201" # Admin tests
- "4173:4173" # Lexical
- "41730:41730" # Lexical HTTPS
- "4175:4175" # Portal
- "4176:4176" # Portal HTTPS
- "4177:4177" # Announcement bar
- "4178:4178" # Search
- "6174:6174" # Signup form
- "7173:7173" # Comments
- "7174:7174" # Comments HTTPS
profiles: [full]
volumes:
- .:/home/ghost
tty: true
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
environment:
- DEBUG=${DEBUG:-}
- GHOST_DEV_APP_FLAGS=${GHOST_DEV_APP_FLAGS:-}
- GHOST_DEV_MODE=${GHOST_DEV_MODE:-}
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-}
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY:-}
- STRIPE_ACCOUNT_ID=${STRIPE_ACCOUNT_ID:-}
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: