mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-04 02:01:58 -05:00
Rename compose profile to ghost (#22223)
no issue - Renamed the docker compose profile for Ghost from `full` to `ghost`, because it is clearer and makes more sense this way - Also added an explicit `GHOST_DEV_IS_DOCKER` environment variable to the `compose.yml` file to make checking if running in docker less fragile and more explicit.
This commit is contained in:
parent
12f14ae891
commit
1891c2a6be
3 changed files with 11 additions and 10 deletions
|
@ -20,7 +20,7 @@ services:
|
||||||
- "6174:6174" # Signup form
|
- "6174:6174" # Signup form
|
||||||
- "7173:7173" # Comments
|
- "7173:7173" # Comments
|
||||||
- "7174:7174" # Comments HTTPS
|
- "7174:7174" # Comments HTTPS
|
||||||
profiles: [ full ]
|
profiles: [ ghost ]
|
||||||
volumes:
|
volumes:
|
||||||
# Mount the source code
|
# Mount the source code
|
||||||
- .:/home/ghost
|
- .:/home/ghost
|
||||||
|
@ -133,6 +133,7 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- DEBUG=${DEBUG:-}
|
- DEBUG=${DEBUG:-}
|
||||||
|
- GHOST_DEV_IS_DOCKER=true
|
||||||
- GHOST_DEV_APP_FLAGS=${GHOST_DEV_APP_FLAGS:-}
|
- GHOST_DEV_APP_FLAGS=${GHOST_DEV_APP_FLAGS:-}
|
||||||
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-}
|
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY:-}
|
||||||
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY:-}
|
- STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY:-}
|
||||||
|
|
|
@ -12,7 +12,7 @@ const configUtils = require('../../utils/configUtils');
|
||||||
|
|
||||||
const startWebhookServer = (port) => {
|
const startWebhookServer = (port) => {
|
||||||
const isCI = process.env.CI;
|
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 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 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));
|
const webhookServer = spawn(command.split(' ')[0], command.split(' ').slice(1));
|
||||||
|
@ -26,7 +26,7 @@ const startWebhookServer = (port) => {
|
||||||
|
|
||||||
const getWebhookSecret = async () => {
|
const getWebhookSecret = async () => {
|
||||||
const isCI = process.env.CI;
|
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 stripeSecretKey = process.env.STRIPE_SECRET_KEY;
|
||||||
const command = `stripe listen --print-secret ${isDocker || isCI ? `--api-key ${stripeSecretKey}` : ''}`.trim();
|
const command = `stripe listen --print-secret ${isDocker || isCI ? `--api-key ${stripeSecretKey}` : ''}`.trim();
|
||||||
const webhookSecret = (await promisify(exec)(command)).stdout;
|
const webhookSecret = (await promisify(exec)(command)).stdout;
|
||||||
|
|
14
package.json
14
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": "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: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",
|
"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": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose run --rm -it ghost",
|
||||||
"docker:dev": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose up --attach=ghost --no-log-prefix",
|
"docker:dev": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose up --attach=ghost --no-log-prefix",
|
||||||
"docker:build": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose build",
|
"docker:build": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} docker compose build",
|
||||||
"docker:shell": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-full} docker compose run --rm -it ghost /bin/bash",
|
"docker:shell": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} 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:unit": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} 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:browser": "COMPOSE_PROFILES=${COMPOSE_PROFILES:-ghost} 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: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:reset": "docker compose down -v && docker compose up -d --wait",
|
||||||
"docker:restart": "docker compose down && docker compose up -d --wait",
|
"docker:restart": "docker compose down && docker compose up -d --wait",
|
||||||
"docker:down": "docker compose down",
|
"docker:down": "docker compose down",
|
||||||
|
|
Loading…
Add table
Reference in a new issue