mirror of
https://github.com/suitenumerique/docs.git
synced 2026-08-21 15:12:23 +02:00
All installation guides are updated to add the instructions about how to deploy docs with yhub.
131 lines
3.9 KiB
YAML
131 lines
3.9 KiB
YAML
services:
|
|
postgresql:
|
|
image: postgres:16
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
|
interval: 1s
|
|
timeout: 2s
|
|
retries: 300
|
|
env_file:
|
|
- env.d/postgresql
|
|
- env.d/common
|
|
environment:
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- ./data/databases/backend:/var/lib/postgresql/data/pgdata
|
|
|
|
redis:
|
|
image: redis:8
|
|
|
|
# The valkey of the collaboration server, apart from the redis above: this one
|
|
# holds the updates no worker has persisted to postgres yet, so it is a store
|
|
# and not a cache. Hence the append-only file, and a policy that only evicts
|
|
# the keys carrying an expiry.
|
|
yhub-valkey:
|
|
image: valkey/valkey:8-alpine
|
|
command: ["valkey-server", "--maxmemory-policy", "volatile-lru",
|
|
"--appendonly", "yes", "--appendfsync", "everysec"]
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "ping"]
|
|
interval: 1s
|
|
timeout: 2s
|
|
retries: 60
|
|
volumes:
|
|
- ./data/yhub-valkey:/data
|
|
|
|
backend:
|
|
image: lasuite/impress-backend:latest
|
|
user: ${DOCKER_USER:-1000}
|
|
restart: always
|
|
environment:
|
|
- DJANGO_CONFIGURATION=Production
|
|
env_file:
|
|
- env.d/common
|
|
- env.d/backend
|
|
- env.d/yprovider
|
|
- env.d/postgresql
|
|
volumes:
|
|
# signs the calls made to the collaboration server and to the converter
|
|
- ./keys/private.pem:/keys/private.pem:ro
|
|
healthcheck:
|
|
test: ["CMD", "python", "manage.py", "check"]
|
|
interval: 15s
|
|
timeout: 30s
|
|
retries: 20
|
|
start_period: 10s
|
|
depends_on:
|
|
postgresql:
|
|
condition: service_healthy
|
|
restart: true
|
|
redis:
|
|
condition: service_started
|
|
|
|
# The collaboration server: it serves everything under /collaboration/, the
|
|
# websocket included, and holds the content of the documents. Its schema is
|
|
# not created when it starts — run `docker compose run --rm yhub npm run
|
|
# init-db` once before the first start, and again after every upgrade.
|
|
yhub:
|
|
image: lasuite/impress-yhub:latest
|
|
user: ${DOCKER_USER:-1000}
|
|
restart: always
|
|
env_file:
|
|
- env.d/common
|
|
- env.d/yhub
|
|
volumes:
|
|
# signs the calls made to the backend, which reads the public half from
|
|
# the JWKS this server publishes
|
|
- ./keys/yhub-private.pem:/keys/yhub-private.pem:ro
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://localhost:3002/collaboration/ready/v1').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 10s
|
|
depends_on:
|
|
postgresql:
|
|
condition: service_healthy
|
|
restart: true
|
|
yhub-valkey:
|
|
condition: service_healthy
|
|
|
|
# The conversion service. It used to serve the collaboration as well, it does
|
|
# not anymore: the backend calls it on Y_PROVIDER_API_BASE_URL, and nothing is
|
|
# routed to it by the proxy.
|
|
y-provider:
|
|
image: lasuite/impress-y-provider:latest
|
|
user: ${DOCKER_USER:-1000}
|
|
env_file:
|
|
- env.d/common
|
|
- env.d/yprovider
|
|
|
|
frontend:
|
|
image: lasuite/impress-frontend:latest
|
|
user: "101"
|
|
entrypoint:
|
|
- /docker-entrypoint.sh
|
|
command: ["nginx", "-g", "daemon off;"]
|
|
env_file:
|
|
- env.d/common
|
|
# Uncomment and set your values if using our nginx proxy example
|
|
#environment:
|
|
# - VIRTUAL_HOST=${DOCS_HOST} # used by nginx proxy
|
|
# - VIRTUAL_PORT=8083 # used by nginx proxy
|
|
# - LETSENCRYPT_HOST=${DOCS_HOST} # used by lets encrypt to generate TLS certificate
|
|
volumes:
|
|
- ./default.conf.template:/etc/nginx/templates/docs.conf.template
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
yhub:
|
|
condition: service_healthy
|
|
|
|
# Uncomment if using our nginx proxy example
|
|
# networks:
|
|
# - proxy-tier
|
|
# - default
|
|
|
|
# Uncomment if using our nginx proxy example
|
|
#networks:
|
|
# proxy-tier:
|
|
# external: true
|