diff --git a/compose.yml b/compose.yml index 88d0081ac6..78dde1922c 100644 --- a/compose.yml +++ b/compose.yml @@ -20,7 +20,7 @@ services: - "6174:6174" # Signup form - "7173:7173" # Comments - "7174:7174" # Comments HTTPS - profiles: [ full ] + profiles: [ ghost ] volumes: # Mount the source code - .:/home/ghost @@ -133,6 +133,7 @@ services: condition: service_healthy environment: - DEBUG=${DEBUG:-} + - GHOST_DEV_IS_DOCKER=true - GHOST_DEV_APP_FLAGS=${GHOST_DEV_APP_FLAGS:-} - STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-} - STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY:-} diff --git a/ghost/core/test/e2e-browser/fixtures/ghost-test.js b/ghost/core/test/e2e-browser/fixtures/ghost-test.js index b23e0cb389..38ae03079c 100644 --- a/ghost/core/test/e2e-browser/fixtures/ghost-test.js +++ b/ghost/core/test/e2e-browser/fixtures/ghost-test.js @@ -12,7 +12,7 @@ const configUtils = require('../../utils/configUtils'); const startWebhookServer = (port) => { const isCI = process.env.CI; - const isDocker = process.env.COMPOSE_PROFILES === 'full'; + const isDocker = process.env.GHOST_DEV_IS_DOCKER === 'true'; const stripeSecretKey = process.env.STRIPE_SECRET_KEY; const command = `stripe listen --forward-connect-to http://127.0.0.1:${port}/members/webhooks/stripe/ ${isDocker || isCI ? `--api-key ${stripeSecretKey}` : ''}`.trim(); const webhookServer = spawn(command.split(' ')[0], command.split(' ').slice(1)); @@ -26,7 +26,7 @@ const startWebhookServer = (port) => { const getWebhookSecret = async () => { const isCI = process.env.CI; - const isDocker = process.env.COMPOSE_PROFILES === 'full'; + const isDocker = process.env.GHOST_DEV_IS_DOCKER === 'true'; const stripeSecretKey = process.env.STRIPE_SECRET_KEY; const command = `stripe listen --print-secret ${isDocker || isCI ? `--api-key ${stripeSecretKey}` : ''}`.trim(); const webhookSecret = (await promisify(exec)(command)).stdout; diff --git a/package.json b/package.json index f18be9732c..abba0d74d0 100644 --- a/package.json +++ b/package.json @@ -34,13 +34,13 @@ "reset:data": "cd ghost/core && node index.js generate-data --clear-database --quantities members:100000,posts:500 --seed 123", "reset:data:empty": "cd ghost/core && node index.js generate-data --clear-database --quantities members:0,posts:0 --seed 123", "reset:data:xxl": "cd ghost/core && node index.js generate-data --clear-database --quantities members:2000000,posts:0,emails:0,members_stripe_customers:0,members_login_events:0,members_status_events:0 --seed 123", - "docker": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose run --rm -it ghost", - "docker:dev": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose up --attach=ghost --no-log-prefix", - "docker:build": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose build", - "docker:shell": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose run --rm -it ghost /bin/bash", - "docker:test:unit": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose run --rm --no-deps ghost yarn test:unit", - "docker:test:browser": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose run --rm ghost yarn test:browser", - "docker:test:all": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose run --rm ghost yarn nx run ghost:test:all", + "docker": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose run --rm -it ghost", + "docker:dev": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose up --attach=ghost --no-log-prefix", + "docker:build": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose build", + "docker:shell": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose run --rm -it ghost /bin/bash", + "docker:test:unit": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose run --rm --no-deps ghost yarn test:unit", + "docker:test:browser": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose run --rm ghost yarn test:browser", + "docker:test:all": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose run --rm ghost yarn nx run ghost:test:all", "docker:reset": "docker compose down -v && docker compose up -d --wait", "docker:restart": "docker compose down && docker compose up -d --wait", "docker:down": "docker compose down",