1e76e6e04c
## Purpose Make self hosting of Docs easier with an example of a deployment procedure with docker compose and document how to configure Docs. While https://github.com/suitenumerique/docs/pull/583 propose an easy way to deploy Docs with docker and Make, here we describe more in details the various steps and requirements to deploy Docs. ## Proposal - [x] example to deploy and configure keycloak - [x] example to deploy and configure minio - [x] example to configure proxy and certs - [x] example to deploy and configure Docs ## Improvements - [x] Rephrase description of environment variables and categorize - [x] Use template for nginx conf Fixes https://github.com/suitenumerique/docs/issues/561 Supersedes https://github.com/suitenumerique/docs/pull/583 A one liner quick start could be a nice addition: - [ ] merge all services in a single compose - [ ] scripts to generate secrets Signed-off-by: unteem <timothee@indie.host>
79 lines
1.9 KiB
YAML
79 lines
1.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
|
|
|
|
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
|
|
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
|
|
|
|
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
|
|
|
|
# Uncomment if using our nginx proxy example
|
|
# networks:
|
|
# - proxy-tier
|
|
# - default
|
|
|
|
# Uncomment if using our nginx proxy example
|
|
#networks:
|
|
# proxy-tier:
|
|
# external: true
|