31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
networks:
|
|
proxy:
|
|
external: true
|
|
|
|
services:
|
|
docusaurus:
|
|
container_name: ${CONTAINER_NAME}
|
|
build:
|
|
context: ./site
|
|
restart: always
|
|
environment:
|
|
SITE_URL: ${SITE_URL}
|
|
NODE_ENV: production
|
|
volumes:
|
|
# The markdown source content — edit files here, then
|
|
# `docker compose up -d --build` (or just `restart`) to rebuild and
|
|
# pick up the changes. Organised as one folder per plugin.
|
|
- ./docs:/app/docs
|
|
# Rebuilds the static site fresh on every container start (picking up
|
|
# whatever is currently in ./docs and the current SITE_URL), then serves
|
|
# the result. A few seconds slower to start than pre-built static files,
|
|
# but means editing docs never requires touching the image.
|
|
command: sh -c "npm run build && npm run serve -- --host 0.0.0.0 --port ${PORT}"
|
|
networks:
|
|
- proxy
|
|
# No host port published — Nginx Proxy Manager reaches this container
|
|
# directly by its container name on the shared "proxy" network. Point
|
|
# NPM's proxy host at http://${CONTAINER_NAME}:${PORT}.
|
|
# ports:
|
|
# - "3000:3000"
|