2021-10-09 20:35:09 +00:00
|
|
|
---
|
|
|
|
- name: create hedgedoc volume folders
|
|
|
|
file:
|
2022-11-25 12:55:50 +00:00
|
|
|
name: "{{ services.hedgedoc.volume_folder }}/{{ volume }}"
|
2021-10-09 20:35:09 +00:00
|
|
|
state: directory
|
|
|
|
loop:
|
|
|
|
- "db"
|
|
|
|
- "hedgedoc/uploads"
|
|
|
|
loop_control:
|
|
|
|
loop_var: volume
|
|
|
|
|
|
|
|
- name: copy sso public certificate
|
|
|
|
copy:
|
|
|
|
src: "files/sso/sso.data.coop.pem"
|
2022-11-25 12:55:50 +00:00
|
|
|
dest: "{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem"
|
2021-10-09 20:35:09 +00:00
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: setup hedgedoc
|
|
|
|
docker_compose:
|
|
|
|
project_name: "hedgedoc"
|
|
|
|
pull: "yes"
|
|
|
|
definition:
|
|
|
|
services:
|
|
|
|
database:
|
|
|
|
image: "postgres:10-alpine"
|
|
|
|
environment:
|
|
|
|
POSTGRES_USER: "codimd"
|
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.hedgedoc }}"
|
|
|
|
POSTGRES_DB: "codimd"
|
|
|
|
restart: "unless-stopped"
|
|
|
|
networks:
|
|
|
|
- "hedgedoc"
|
|
|
|
volumes:
|
2022-11-25 12:55:50 +00:00
|
|
|
- "{{ services.hedgedoc.volume_folder }}/db:/var/lib/postgresql/data"
|
2021-10-09 20:35:09 +00:00
|
|
|
|
|
|
|
app:
|
2022-11-25 12:55:50 +00:00
|
|
|
image: quay.io/hedgedoc/hedgedoc:{{ services.hedgedoc.version }}
|
2021-10-09 20:35:09 +00:00
|
|
|
environment:
|
|
|
|
CMD_DB_URL: "postgres://codimd:{{ postgres_passwords.hedgedoc }}@hedgedoc_database_1:5432/codimd"
|
2022-11-25 12:55:50 +00:00
|
|
|
CMD_DOMAIN: "{{ services.hedgedoc.domain }}"
|
2021-10-09 20:35:09 +00:00
|
|
|
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"
|
2022-11-25 12:55:50 +00:00
|
|
|
VIRTUAL_HOST: "{{ services.hedgedoc.domain }}"
|
|
|
|
LETSENCRYPT_HOST: "{{ services.hedgedoc.domain }}"
|
2021-10-09 20:35:09 +00:00
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
|
|
|
volumes:
|
2022-11-25 12:55:50 +00:00
|
|
|
- "{{ services.hedgedoc.volume_folder }}/hedgedoc/uploads:/hedgedoc/public/uploads"
|
|
|
|
- "{{ services.hedgedoc.volume_folder }}/sso.data.coop.pem:/sso.data.coop.pem"
|
2021-10-09 20:35:09 +00:00
|
|
|
restart: "unless-stopped"
|
|
|
|
networks:
|
|
|
|
- "hedgedoc"
|
|
|
|
- "external_services"
|
|
|
|
depends_on:
|
|
|
|
- database
|
|
|
|
|
|
|
|
networks:
|
|
|
|
hedgedoc:
|
|
|
|
external_services:
|
2022-11-25 21:04:38 +00:00
|
|
|
external: true
|