2021-10-09 20:35:09 +00:00
|
|
|
---
|
|
|
|
- name: create hedgedoc volume folders
|
2022-11-26 08:52:41 +00:00
|
|
|
ansible.builtin.file:
|
|
|
|
name: '{{ services.hedgedoc.volume_folder }}/{{ volume }}'
|
2021-10-09 20:35:09 +00:00
|
|
|
state: directory
|
|
|
|
loop:
|
2022-11-26 08:52:41 +00:00
|
|
|
- db
|
|
|
|
- hedgedoc/uploads
|
2021-10-09 20:35:09 +00:00
|
|
|
loop_control:
|
|
|
|
loop_var: volume
|
|
|
|
|
|
|
|
- name: copy sso public certificate
|
2022-11-26 08:52:41 +00:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: files/sso/sso.data.coop.pem
|
|
|
|
dest: '{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem'
|
|
|
|
mode: '0644'
|
2021-10-09 20:35:09 +00:00
|
|
|
|
|
|
|
- name: setup hedgedoc
|
2022-11-26 08:52:41 +00:00
|
|
|
community.docker.docker_compose:
|
|
|
|
project_name: hedgedoc
|
|
|
|
pull: true
|
2021-10-09 20:35:09 +00:00
|
|
|
definition:
|
|
|
|
services:
|
|
|
|
database:
|
2022-11-26 08:52:41 +00:00
|
|
|
image: postgres:10-alpine
|
2021-10-09 20:35:09 +00:00
|
|
|
environment:
|
2022-11-26 08:52:41 +00:00
|
|
|
POSTGRES_USER: codimd
|
|
|
|
POSTGRES_PASSWORD: '{{ postgres_passwords.hedgedoc }}'
|
|
|
|
POSTGRES_DB: codimd
|
|
|
|
restart: unless-stopped
|
2021-10-09 20:35:09 +00:00
|
|
|
networks:
|
2022-11-26 08:52:41 +00:00
|
|
|
- hedgedoc
|
2021-10-09 20:35:09 +00:00
|
|
|
volumes:
|
2022-11-26 08:52:41 +00:00
|
|
|
- '{{ services.hedgedoc.volume_folder }}/db:/var/lib/postgresql/data'
|
2021-10-09 20:35:09 +00:00
|
|
|
app:
|
2022-11-26 08:15:18 +00:00
|
|
|
image: quay.io/hedgedoc/hedgedoc:{{ services.hedgedoc.version }}
|
2021-10-09 20:35:09 +00:00
|
|
|
environment:
|
2022-11-26 08:52:41 +00:00
|
|
|
CMD_DB_URL: postgres://codimd:{{ postgres_passwords.hedgedoc }}@hedgedoc_database_1:5432/codimd
|
|
|
|
CMD_DOMAIN: '{{ services.hedgedoc.domain }}'
|
|
|
|
CMD_ALLOW_EMAIL_REGISTER: 'False'
|
|
|
|
CMD_IMAGE_UPLOAD_TYPE: filesystem
|
|
|
|
CMD_EMAIL: 'False'
|
|
|
|
CMD_SAML_IDPCERT: /sso.data.coop.pem
|
|
|
|
CMD_SAML_IDPSSOURL: https://sso.data.coop/auth/realms/datacoop/protocol/saml
|
|
|
|
CMD_SAML_ISSUER: hedgedoc
|
|
|
|
CMD_SAML_IDENTIFIERFORMAT: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
|
|
|
CMD_USECDN: 'false'
|
|
|
|
CMD_PROTOCOL_USESSL: 'true'
|
|
|
|
VIRTUAL_HOST: '{{ services.hedgedoc.domain }}'
|
|
|
|
LETSENCRYPT_HOST: '{{ services.hedgedoc.domain }}'
|
|
|
|
LETSENCRYPT_EMAIL: '{{ letsencrypt_email }}'
|
2021-10-09 20:35:09 +00:00
|
|
|
volumes:
|
2022-11-26 08:52:41 +00:00
|
|
|
- '{{ services.hedgedoc.volume_folder }}/hedgedoc/uploads:/hedgedoc/public/uploads'
|
|
|
|
- '{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem:/sso.data.coop.pem'
|
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
- hedgedoc
|
|
|
|
- external_services
|
2021-10-09 20:35:09 +00:00
|
|
|
depends_on:
|
|
|
|
- database
|
|
|
|
|
2022-11-26 08:52:41 +00:00
|
|
|
networks:
|
2021-10-09 20:35:09 +00:00
|
|
|
hedgedoc:
|
|
|
|
external_services:
|
2022-11-25 21:04:38 +00:00
|
|
|
external: true
|