ref
https://linear.app/ghost/issue/ENG-1956/redis-creates-new-anonymous-volume-each-time-it-boots
- Before this commit, the redis service in our docker compose setup
would create a new anonymous volume each time it boots, with a
non-descriptive, hash-based name. Over time these volumes accumulate and
become a pain to clean up, and it's not immediately obvious what they
are used for.
- This commit adds a persistent data volume for redis data, so it will
reuse the same volume, with a more descriptive title each time it boots.
This eliminates the annoying anonymous volumes, and also gives us data
persistence across boots for the redis service (which can be easily
cleared by deleting the volume).
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.
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`
no issue
- The current devcontainer setup was built with the intention of using
it as the _primary_ way of running Ghost in Docker locally. As such, it
was designed to be extensible — there was a `base.compose.yml` file with
the default configuration, and multiple other `compose.yml` files that
could be added to extend the base setup to cover different use-cases.
- We've run into some problems with using the devcontainer for regular
day to day usage, so we're moving toward using a more conventional
`compose` based setup for more advanced configurations.
- We're going to keep the devcontainer around as it's still nice for a
quick and easy setup, but it no longer needs to support multiple
configurations — as such, we can simplify the setup to a single
`compose.yml` file to make it easier to reason about and troubleshoot if
anything goes wrong.
- This commit removes the `.devcontainer/.docker` directory, and many of
the files that were in it. The main `compose.yml` file and the
Dockerfile were moved to the root of `.devcontainer` which should make
the setup a bit easier to follow and modify as needed.
2024-11-18 14:15:11 -08:00
Renamed from .devcontainer/.docker/base.compose.yml (Browse further)