0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/.devcontainer/compose.yml
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

37 lines
957 B
YAML

# Base container and services for running Ghost
## Intended to be extended by another compose file
## e.g. docker compose -f base.compose.yml -f development.compose.yml up
## Does not include development dependencies, Ghost code, or any other dependencies
name: ghost-devcontainer
services:
ghost:
image: ghost-devcontainer
command: ["sleep", "infinity"]
build:
context: ../
dockerfile: .docker/Dockerfile
target: base-devcontainer
args:
WORKDIR: /workspaces/ghost
pull_policy: never
environment:
- DEVCONTAINER=true
tty: true
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
mysql:
extends:
file: ../compose.yml
service: mysql
container_name: ghost-devcontainer-mysql
redis:
extends:
file: ../compose.yml
service: redis
container_name: ghost-devcontainer-redis
volumes:
mysql-data: