Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lasuite/bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
helper scripts go here
1 change: 1 addition & 0 deletions lasuite/data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service state and logs go here
1 change: 1 addition & 0 deletions lasuite/docs/bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
helper scripts go here
1 change: 1 addition & 0 deletions lasuite/docs/data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service state and logs go here
148 changes: 148 additions & 0 deletions lasuite/docs/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
services:
postgresql:
image: postgres:16
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-U", "docs", "-d", "docs" ]
interval: 1s
timeout: 2s
retries: 300
env_file:
- .env
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ./data/databases/backend:/var/lib/postgresql/data/pgdata

redis:
image: redis:5

backend:
image: lasuite/impress-backend:latest
user: ${DOCKER_USER:-1000}
restart: always
environment:
- DJANGO_CONFIGURATION=Production
# Common variables
- DOCS_HOST=${DOCS_HOST}
- S3_HOST=${S3_HOST}
- MINIO_HOST=${MINIO_HOST}
- BACKEND_HOST=${BACKEND_HOST}
- FRONTEND_HOST=${FRONTEND_HOST}
- BUCKET_NAME=docs-media-storage
- REALM_NAME=docs
# Backend variables## Django
- DJANGO_ALLOWED_HOSTS=${DOCS_HOST}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_SETTINGS_MODULE=impress.settings
- DJANGO_CONFIGURATION=Production

# Logging
# Set to DEBUG level for dev only
- LOGGING_LEVEL_HANDLERS_CONSOLE=ERROR
- LOGGING_LEVEL_LOGGERS_ROOT=INFO
- LOGGING_LEVEL_LOGGERS_APP=INFO

# Python
- PYTHONPATH=/app

# Mail
- DJANGO_EMAIL_HOST=${DJANGO_EMAIL_HOST}
- DJANGO_EMAIL_HOST_USER=${DJANGO_EMAIL_HOST_USER}
- DJANGO_EMAIL_HOST_PASSWORD=${DJANGO_EMAIL_HOST_PASSWORD}
- DJANGO_EMAIL_PORT=${DJANGO_EMAIL_PORT}
- DJANGO_EMAIL_FROM=${DJANGO_EMAIL_FROM}

#DJANGO_EMAIL_USE_TLS=true # A flag to enable or disable TLS for email sending.
#DJANGO_EMAIL_USE_SSL=true # A flag to enable or disable SSL for email sending.

- DJANGO_EMAIL_BRAND_NAME="Monadical"
# DJANGO_EMAIL_LOGO_IMG="https://${DOCS_HOST}/assets/logo-suite-numerique.png"

# Media
- AWS_S3_ENDPOINT_URL=https://${S3_HOST}
- AWS_S3_ACCESS_KEY_ID=${AWS_S3_ACCESS_KEY_ID}
- AWS_S3_SECRET_ACCESS_KEY=${AWS_S3_SECRET_ACCESS_KEY}
- AWS_STORAGE_BUCKET_NAME=${BUCKET_NAME}
- MEDIA_BASE_URL=https://${DOCS_HOST}

# OIDC
- OIDC_OP_JWKS_ENDPOINT=${OIDC_OP_JWKS_ENDPOINT}
- OIDC_OP_AUTHORIZATION_ENDPOINT=${OIDC_OP_AUTHORIZATION_ENDPOINT}
- OIDC_OP_TOKEN_ENDPOINT=${OIDC_OP_TOKEN_ENDPOINT}
- OIDC_OP_USER_ENDPOINT=${OIDC_OP_USER_ENDPOINT}
- OIDC_OP_LOGOUT_ENDPOINT=${OIDC_OP_LOGOUT_ENDPOINT}
- OIDC_RP_CLIENT_ID=${OIDC_RP_CLIENT_ID}
- OIDC_RP_CLIENT_SECRET=${OIDC_RP_CLIENT_SECRET}
- OIDC_RP_SIGN_ALGO=RS256
- OIDC_RP_SCOPES="openid email"
#USER_OIDC_FIELD_TO_SHORTNAME
#USER_OIDC_FIELDS_TO_FULLNAME

- LOGIN_REDIRECT_URL=https://${DOCS_HOST}
- LOGIN_REDIRECT_URL_FAILURE=https://${DOCS_HOST}
- LOGOUT_REDIRECT_URL=https://${DOCS_HOST}
- OIDC_REDIRECT_ALLOWED_HOSTS=["https://${DOCS_HOST}"]

# AI
- AI_FEATURE_ENABLED=true # is false by default
- AI_BASE_URL=${AI_BASE_URL}
- AI_API_KEY=${AI_API_KEY}
- AI_MODEL=${AI_MODEL} # e.g. llama
# Frontend
#FRONTEND_THEME=mytheme
#FRONTEND_CSS_URL=https://storage.yourdomain.tld/themes/custom.css
#FRONTEND_FOOTER_FEATURE_ENABLED=true
#FRONTEND_URL_JSON_FOOTER=https://docs.domain.tld/contents/footer-demo.json

env_file:
- .env
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}
entrypoint:
- Y_PROVIDER_API_KEY=${Y_PROVIDER_API_KEY}
- COLLABORATION_SERVER_SECRET=${COLLABORATION_SERVER_SECRET}
- COLLABORATION_SERVER_ORIGIN=https://${DOCS_HOST}
- COLLABORATION_API_URL=https://${DOCS_HOST}/collaboration/api/
- COLLABORATION_WS_URL=wss://${DOCS_HOST}/collaboration/ws/
- COLLABORATION_BACKEND_BASE_URL=https://${DOCS_HOST}
- COLLABORATION_LOGGING=true

frontend:
image: lasuite/impress-frontend:latest
user: "101"
env_file:
- .env
# 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/default.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
65 changes: 65 additions & 0 deletions lasuite/docs/env.d/backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## Django
DJANGO_ALLOWED_HOSTS=${DOCS_HOST}
DJANGO_SECRET_KEY=<generate a random key>
DJANGO_SETTINGS_MODULE=impress.settings
DJANGO_CONFIGURATION=Production

# Logging
# Set to DEBUG level for dev only
LOGGING_LEVEL_HANDLERS_CONSOLE=ERROR
LOGGING_LEVEL_LOGGERS_ROOT=INFO
LOGGING_LEVEL_LOGGERS_APP=INFO

# Python
PYTHONPATH=/app

# Mail
DJANGO_EMAIL_HOST=<smtp host>
DJANGO_EMAIL_HOST_USER=<smtp user>
DJANGO_EMAIL_HOST_PASSWORD=<smtp password>
DJANGO_EMAIL_PORT=<smtp port>
DJANGO_EMAIL_FROM=<your email address>

#DJANGO_EMAIL_USE_TLS=true # A flag to enable or disable TLS for email sending.
#DJANGO_EMAIL_USE_SSL=true # A flag to enable or disable SSL for email sending.

DJANGO_EMAIL_BRAND_NAME="La Suite Numérique"
DJANGO_EMAIL_LOGO_IMG="https://${DOCS_HOST}/assets/logo-suite-numerique.png"

# Media
AWS_S3_ENDPOINT_URL=https://${S3_HOST}
AWS_S3_ACCESS_KEY_ID=<s3 access key>
AWS_S3_SECRET_ACCESS_KEY=<s3 secret key>
AWS_STORAGE_BUCKET_NAME=${BUCKET_NAME}
MEDIA_BASE_URL=https://${DOCS_HOST}

# OIDC
OIDC_OP_JWKS_ENDPOINT=https://${KEYCLOAK_HOST}/realms/${REALM_NAME}/protocol/openid-connect/certs
OIDC_OP_AUTHORIZATION_ENDPOINT=https://${KEYCLOAK_HOST}/realms/${REALM_NAME}/protocol/openid-connect/auth
OIDC_OP_TOKEN_ENDPOINT=https://${KEYCLOAK_HOST}/realms/${REALM_NAME}/protocol/openid-connect/token
OIDC_OP_USER_ENDPOINT=https://${KEYCLOAK_HOST}/realms/${REALM_NAME}/protocol/openid-connect/userinfo
OIDC_OP_LOGOUT_ENDPOINT=https://${KEYCLOAK_HOST}/realms/${REALM_NAME}/protocol/openid-connect/logout
OIDC_RP_CLIENT_ID=<client_id>
OIDC_RP_CLIENT_SECRET=<client secret>
OIDC_RP_SIGN_ALGO=RS256
OIDC_RP_SCOPES="openid email"
#USER_OIDC_FIELD_TO_SHORTNAME
#USER_OIDC_FIELDS_TO_FULLNAME

LOGIN_REDIRECT_URL=https://${DOCS_HOST}
LOGIN_REDIRECT_URL_FAILURE=https://${DOCS_HOST}
LOGOUT_REDIRECT_URL=https://${DOCS_HOST}

OIDC_REDIRECT_ALLOWED_HOSTS=["https://${DOCS_HOST}"]

# AI
#AI_FEATURE_ENABLED=true # is false by default
#AI_BASE_URL=https://openaiendpoint.com
#AI_API_KEY=<API key>
#AI_MODEL=<model used> e.g. llama

# Frontend
#FRONTEND_THEME=mytheme
#FRONTEND_CSS_URL=https://storage.yourdomain.tld/themes/custom.css
#FRONTEND_FOOTER_FEATURE_ENABLED=true
#FRONTEND_URL_JSON_FOOTER=https://docs.domain.tld/contents/footer-demo.json
7 changes: 7 additions & 0 deletions lasuite/docs/env.d/common
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DOCS_HOST=docs.domain.tld
S3_HOST=storage.domain.tld
MINIO_HOST=storage.domain.tld
BACKEND_HOST=backend
FRONTEND_HOST=frontend
BUCKET_NAME=docs-media-storage
REALM_NAME=docs
7 changes: 7 additions & 0 deletions lasuite/docs/env.d/yprovider
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Y_PROVIDER_API_KEY=<generate a random key>
COLLABORATION_SERVER_SECRET=<generate a random key>
COLLABORATION_SERVER_ORIGIN=https://${DOCS_HOST}
COLLABORATION_API_URL=https://${DOCS_HOST}/collaboration/api/
COLLABORATION_WS_URL=wss://${DOCS_HOST}/collaboration/ws/
COLLABORATION_BACKEND_BASE_URL=https://${DOCS_HOST}
COLLABORATION_LOGGING=true
1 change: 1 addition & 0 deletions lasuite/docs/etc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config files go here
1 change: 1 addition & 0 deletions lasuite/etc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config files go here