63 lines
2.4 KiB
YAML
63 lines
2.4 KiB
YAML
---
|
|
# Infrastructure
|
|
# Ansible instructions to deploy the infrastructure
|
|
# Copyright (C) 2019-2020 Christoph (Sheogorath) Kern
|
|
# Copyright (C) 2019-2020 Alexander (w4tsn) Wellbrock
|
|
# Copyright (C) 2021 Saibotk
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, version 3 of the License.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
version: '2'
|
|
services:
|
|
elementweb:
|
|
image: docker.io/vectorim/element-web:{{ matrix_elementweb_image_version }}
|
|
mem_limit: 512mb
|
|
memswap_limit: 768mb
|
|
read_only: true
|
|
security_opt:
|
|
- no-new-privileges
|
|
tmpfs:
|
|
- "/var/cache/nginx:size=10M"
|
|
- "/run:size=512K"
|
|
- "/tmp:rw,noexec,nosuid,size=10M"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.matrix-elementweb.rule=Host(`{{ matrix_elementweb_domain }}`) && PathPrefix(`/`)"
|
|
- "traefik.http.routers.matrix-elementweb.entrypoints=websecure"
|
|
- "traefik.http.routers.matrix-elementweb.tls.certresolver={{ matrix_elementweb_traefik_certresolver }}"
|
|
- "traefik.http.routers.matrix-elementweb.middlewares=matrix-elementweb,compress"
|
|
- "traefik.http.middlewares.matrix-elementweb.headers.sslredirect=true"
|
|
- "traefik.http.middlewares.matrix-elementweb.headers.stsSeconds=63072000"
|
|
- "traefik.http.middlewares.matrix-elementweb.headers.referrerPolicy=no-referrer"
|
|
|
|
{% if proxy_network is defined %}
|
|
- "traefik.docker.network={{ proxy_network }}"
|
|
{% endif %}
|
|
{% if proxy_hiddenservice is defined and proxy_hiddenservice.content is defined %}
|
|
- "traefik.http.middlewares.matrix-elementweb.headers.customresponseheaders.alt-svc:h2={{ proxy_hiddenservice['content'] | b64decode | trim }}:443; ma=2592000"
|
|
{% endif %}
|
|
volumes:
|
|
- "{{ matrix_elementweb_data_location }}/config.json:/app/config.json:ro"
|
|
{% if proxy_network is defined %}
|
|
networks:
|
|
{{ proxy_network }}:
|
|
{% endif %}
|
|
restart: always
|
|
|
|
{% if proxy_network is defined %}
|
|
networks:
|
|
{{ proxy_network }}:
|
|
external: true
|
|
{% endif %}
|