0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Chris Raible
bc37f87074
Updated @playwright/test to 1.50.1 (#22138)
no issue

- Updated @playwright/test to 1.50.1 in all packages that use playwright
2025-02-06 20:14:55 -08:00
Chris Raible
99037bb521
Revert "Disabled nx daemon in docker container (#22066)" (#22067)
This reverts commit 38d377d434.

- Disabling the daemon led to more problems than it solved with `yarn
dev` running in Docker
2025-01-29 01:50:03 +00:00
Chris Raible
38d377d434
Disabled nx daemon in docker container (#22066)
no issue

- When the nx daemon is enabled and using docker for local development,
we periodically get an error like the following, which crashes `yarn
dev` and requires a manual restart:

```
Daemon process terminated and closed the connection

Please rerun the command, which will restart the daemon.
If you get this error again, check for any errors in the daemon process logs found in: /home/ghost/.nx/workspace-data/d/daemon.log
```

- Disabling the daemon in docker prevents these errors, and so far I
haven't noticed any performance degradation from disabling it.
2025-01-28 15:59:23 -08:00
Chris Raible
d4bf982392
Fixed hot reload for admin in docker compose (#22059)
no issue

- Hot reload for admin depends on the browser being able to reach port
4201, which was not exposed in the docker compose setup — this fixes
that so admin will hot reload when running Ghost in docker compose
2025-01-28 06:06:53 +00:00
Chris Raible
1344970128
Added docker:setup yarn script (#22058)
ref
https://linear.app/ghost/issue/ENG-1959/extend-setupjs-to-modify-config-as-appropriate-for-full-docker-dev

- When switching from local development to docker, there are a few
configuration parameters that need to be updated to e.g. point to the
right database host within the docker network.
- Setting these values with environment variables doesn't work well
because the configuration passed via environment overrides the
configuration set in tests, and thus points tests to the wrong database.
- This commit adds a yarn docker:setup command to the root of the repo,
to make it easier to get started with a full docker compose based
workflow. It edits you config.local.json file to update the necessary
settings for running Ghost in docker compose.
- It also updates the clean.js script such that it will run successfully
regardless of whether it is run locally or in docker.
- Finally, this commit also adds convenience commands for developing and
running tests in docker compose
2025-01-27 21:37:40 -08:00
Chris Raible
c1f9740665
Added opt-in ghost service to docker compose (#21938)
ref
https://linear.app/ghost/issue/ENG-1957/add-ghost-service-to-base-docker-compose-setup

- Currently our `compose.yml` file only runs Ghost's supporting
services, and it's expected that you'll run Ghost locally on your host
machine. This commit adds a `ghost` service to our `compose.yml` file,
so you can optionally run Ghost itself in a container using docker
compose.
- The `ghost` service is opt-in using [docker compose
profiles](https://docs.docker.com/compose/how-tos/profiles/), to
maintain the current behavior of only running supporting services as the
default.
- This commit also fixes an issue in the Dockerfile: the `WORKDIR` arg,
which is used to optionally specify an alternative working directory, is
not propagated from one build stage to the next, so it has to be
manually added as an `ARG` in each stage. This was necessary to use the
same Dockerfile for devcontainers (which require the WORKDIR to be
`/workspaces/ghost`) and docker compose, where we use `/home/ghost` in
alignment with the production image.
2025-01-07 14:16:43 -08:00
Chris Raible
cabee005f4
Consolidated compose.yml files for Dev Container (#21659)
ref
https://linear.app/ghost/issue/ENG-1785/consolidate-dev-container-composeyml-with-the-root-level-composeyml

- We currently have two compose.yml files:
    - `.devcontainer/compose.yml`: used for the Dev Container
    - `compose.yml`: used for local development with docker compose
- The Dev Container compose file does need some additional
configuration, but most of this code is duplicated from the root level
compose.yml file
- This commit removes this duplication by using both compose files in
the Dev Container setup, so it will base the compose configuration on
the root level, and then extend it with the Dev Container specific
configuration
- This way any updates to the root level compose file will also be
available and reflected in the Dev Container setup without having to
make the change twice.
2024-12-17 12:57:02 -08:00
Chris Raible
05127ddc5c
Reorganized docker related files (#21650)
ref https://linear.app/ghost/issue/ENG-1782/move-docker-related-files-to-a-better-location-that-githubscripts

- The docker files are currently located in `.github/scripts`. This location doesn't make a lot of sense — you wouldn't think to look there unless you already knew they were there. This also requires you to specify the path to the `compose.yml` file whenever running a `docker compose ...` command. 
- This commit moves the `compose.yml` file to the root of the repo, so you can simply run `docker compose up` and it will automatically find the file in the root, without having to specify `-f .github/scripts/docker-compose.yml`. This is a major win for convenience over the current setup.
- It also moves all the related files, including the `Dockerfile` used by the Dev Container setup and configuration files for supporting services into a new `.docker` directory, which is a more logical location, and should be easier to find.
- Also updated the current convenience commands in the `package.json` scripts block (`yarn docker:reset` and `yarn docker:down`
2024-11-19 13:15:06 -08:00