cookiecutter-django/{{cookiecutter.project_slug}}/docker-compose.docs.yml

31 lines
1009 B
YAML
Raw Normal View History

services:
docs:
image: {{ cookiecutter.project_slug }}_local_docs
container_name: {{ cookiecutter.project_slug }}_local_docs
build:
context: .
dockerfile: ./compose/local/docs/Dockerfile
env_file:
- ./.envs/.local/.django
volumes:
- ./docs:/docs:z
develop:
# Create a `watch` configuration to update the appl
# https://docs.docker.com/compose/file-watch/#compose-watch-versus-bind-mounts
watch:
# Sync the working directory with the `/app` directory in the container
- action: sync
path: {{ cookiecutter.project_slug }}
target: /app/{{ cookiecutter.project_slug }}
# Exclude the project virtual environment — it could be for a
# different platform in the container
ignore:
- .venv/
# Rebuild the image on changes to the `pyproject.toml`
- action: rebuild
path: ./pyproject.toml
ports:
- '9000:9000'
command: /start-docs