Files
Dat VuandDat H. Pham d043c98431 Move inline web scripts to files and enforce the nginx page policy (#5115)
* Move inline web scripts to files and enforce the nginx page policy

* Render CSP_* through the nginx image entrypoint and allow blob: in connect-src

* Allow CSP_IMG_SRC and document nginx add_header inheritance and connect-src ports

* Keep a read-only logo mount from stopping nginx and add optional CSP_REPORT_URI

* fix: start nginx when the root or a logo mount is read-only

* docs: document the web CSP variables and upgrade steps

---------

Co-authored-by: Dat H. Pham <dphamhoang@linagora.com>
2026-11-08 10:54:57 +07:00

32 lines
1.5 KiB
YAML

# QA stack started by start.sh. The backend configuration is the one of backend-docker/, except
# the files start.sh generates under .generated/ (JWT keys, jmap.properties with the public URLs,
# the env.file of the web app).
services:
tmail-backend:
image: ${TMAIL_BACKEND_IMAGE:?}
volumes:
- ./.generated/jwt_publickey:/root/conf/jwt_publickey
- ./.generated/jwt_privatekey:/root/conf/jwt_privatekey
- ./.generated/jmap.properties:/root/conf/jmap.properties
- ../../backend-docker/mailetcontainer.xml:/root/conf/mailetcontainer.xml
- ../../backend-docker/imapserver.xml:/root/conf/imapserver.xml
- ../../backend-docker/deletedMessageVault.properties:/root/conf/deletedMessageVault.properties
- ../../backend-docker/listeners.xml:/root/conf/listeners.xml
- ../../backend-docker/linagora-ecosystem.properties:/root/conf/linagora-ecosystem.properties
- ../../backend-docker/openpaas.properties:/root/conf/openpaas.properties
- ../../provisioning/integration_test/provisioning.sh:/root/conf/integration_test/provisioning.sh
- ../../provisioning/integration_test/backup.zip:/root/conf/integration_test/backup.zip
ports:
- "${QA_JMAP_PORT:?}:80"
environment:
- DOMAIN=example.com
web:
image: tmail-web-qa
environment:
- CSP_CONNECT_SRC=http://localhost:${QA_JMAP_PORT} ws://localhost:${QA_JMAP_PORT}
volumes:
- ./.generated/env.file:/usr/share/nginx/html/assets/env.file:ro
ports:
- "${QA_WEB_PORT:?}:80"