2019-02-13 20:16:36 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: codimd network
|
2022-11-26 08:52:41 +00:00
|
|
|
community.docker.docker_network:
|
2019-02-13 20:16:36 +00:00
|
|
|
name: codimd
|
|
|
|
|
|
|
|
- name: create codimd volume folders
|
2022-11-26 08:52:41 +00:00
|
|
|
ansible.builtin.file:
|
|
|
|
name: '{{ codimd.volume_folder }}/{{ volume }}'
|
2019-02-13 20:16:36 +00:00
|
|
|
state: directory
|
|
|
|
loop:
|
2022-11-26 08:52:41 +00:00
|
|
|
- db
|
|
|
|
- codimd/uploads
|
2019-02-13 20:16:36 +00:00
|
|
|
|
|
|
|
loop_control:
|
|
|
|
loop_var: volume
|
|
|
|
|
|
|
|
- name: codimd database container
|
2022-11-26 08:52:41 +00:00
|
|
|
community.docker.docker_container:
|
2019-02-13 20:16:36 +00:00
|
|
|
name: codimd_db
|
|
|
|
image: postgres:10
|
|
|
|
state: started
|
|
|
|
restart_policy: unless-stopped
|
|
|
|
networks:
|
|
|
|
- name: codimd
|
|
|
|
volumes:
|
2022-11-26 08:52:41 +00:00
|
|
|
- '{{ codimd.volume_folder }}/db:/var/lib/postgresql/data'
|
2019-02-13 20:16:36 +00:00
|
|
|
env:
|
2022-11-26 08:52:41 +00:00
|
|
|
POSTGRES_USER: codimd
|
|
|
|
POSTGRES_PASSWORD: '{{ postgres_passwords.codimd }}'
|
2019-02-13 20:16:36 +00:00
|
|
|
|
|
|
|
- name: codimd app container
|
2022-11-26 08:52:41 +00:00
|
|
|
community.docker.docker_container:
|
2019-02-13 20:16:36 +00:00
|
|
|
name: codimd_app
|
2019-03-05 09:06:10 +00:00
|
|
|
image: hackmdio/hackmd:1.3.0
|
2019-02-13 20:16:36 +00:00
|
|
|
restart_policy: unless-stopped
|
|
|
|
networks:
|
|
|
|
- name: codimd
|
|
|
|
- name: ldap
|
|
|
|
- name: external_services
|
|
|
|
volumes:
|
2022-11-26 08:52:41 +00:00
|
|
|
- '{{ codimd.volume_folder }}/codimd/uploads:/codimd/public/uploads'
|
2019-02-13 20:16:36 +00:00
|
|
|
|
|
|
|
env:
|
2022-11-26 08:52:41 +00:00
|
|
|
CMD_DB_URL: postgres://codimd:{{ postgres_passwords.codimd }}@codimd_db:5432/codimd
|
|
|
|
CMD_ALLOW_EMAIL_REGISTER: 'False'
|
|
|
|
CMD_IMAGE_UPLOAD_TYPE: filesystem
|
|
|
|
CMD_EMAIL: 'False'
|
|
|
|
CMD_LDAP_URL: ldap://openldap
|
|
|
|
CMD_LDAP_BINDDN: cn=admin,dc=data,dc=coop
|
|
|
|
CMD_LDAP_BINDCREDENTIALS: '{{ ldap_admin_password }}'
|
|
|
|
CMD_LDAP_SEARCHBASE: dc=data,dc=coop
|
|
|
|
CMD_LDAP_SEARCHFILTER: (&(uid={{ '{{username}}' }})(objectClass=inetOrgPerson))
|
|
|
|
CMD_USECDN: 'false'
|
|
|
|
VIRTUAL_HOST: '{{ codimd.domain }}'
|
|
|
|
LETSENCRYPT_HOST: '{{ codimd.domain }}'
|
|
|
|
LETSENCRYPT_EMAIL: '{{ letsencrypt_email }}'
|