0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-04 02:01:58 -05:00
Commit graph

1 commit

Author SHA1 Message Date
Chris Raible
5547c0b6f0
Added .env.example file to simplify getting started with docker compose (#22247)
no issue

- To run Ghost itself in docker compose, you need to enable the `ghost`
compose profile by setting `COMPOSE_PROFILES=ghost`.
- This is done for you if you use the `yarn docker:*` commands, but if
you run any other `docker compose ...` commands manually, the `ghost`
profile won't be enabled by default.
- The easiest way to set `COMPOSE_PROFILES` is with a `.env` file in the
root of the repo. This `.env.example` file is a template than can be
easily copied to `.env` by running `cp .env.example .env`, which will in
turn enable the `ghost` profile.
- It also includes commented out environment variables that are useful
when running Ghost in Docker compose, such as stripe keys, app flags
(for running e.g. portal), and `DEBUG` modes.

This commit also includes some minor changes to the `dev.js` script:
- Adds a list of `availableFlags`, including all the app flags that it
will accept
- Adds validation to log an error and exit if any invalid flags are
passed. This will force us to keep this list up to date if/when we add
more app flags
- Adds a `show-flags` flag, which will print all the available flags,
along with a description, then immediately exit.

Ultimately this makes getting started with docker compose more straight
forward:
- Clone the repo
- Run `cp .env.example .env` to enable the `ghost` profile
- Run `docker compose up`
2025-02-19 13:16:30 -08:00