Merge pull request 'Fix hedgedoc setup' (!39) from fix-hedgedoc into master

Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/39
This commit is contained in:
dkdent 2022-06-28 20:23:05 +00:00
commit c9fa0ce836

View file

@ -187,7 +187,7 @@
- name: Check if hedgedoc data dir exists - name: Check if hedgedoc data dir exists
ansible.builtin.stat: ansible.builtin.stat:
path: "/srv/docker/hedgedoc" path: "/srv/data/hedgedoc"
register: hedgedoc_dir register: hedgedoc_dir
- name: Fail if hedgedoc data dir does not exist - name: Fail if hedgedoc data dir does not exist
ansible.builtin.fail: ansible.builtin.fail:
@ -199,8 +199,8 @@
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
with_items: with_items:
- "/srv/docker/hedgedoc/data/database" - "/srv/data/hedgedoc/data/database"
- "/srv/docker/hedgedoc/data/uploads" - "/srv/data/hedgedoc/data/uploads"
- name: Setup docker network - name: Setup docker network
docker_network: docker_network:
@ -217,11 +217,11 @@
restart_policy: unless-stopped restart_policy: unless-stopped
detach: yes detach: yes
env: env:
POSTGRES_USER: hedgedoc POSTGRES_USER: "hedgedoc"
POSTGRES_PASSWORD: "{{ hedgedoc_postgres_password }}" POSTGRES_PASSWORD: "{{ hedgedoc_postgres_password }}"
POSTGRES_DB: hedgedoc POSTGRES_DB: "hedgedoc"
volumes: volumes:
- "/srv/docker/hedgedoc/data/database:/var/lib/postgresql/data" - "/srv/data/hedgedoc/data/database:/var/lib/postgresql/data"
networks: networks:
- name: hedgedocnet - name: hedgedocnet
@ -236,17 +236,18 @@
- "{{ hedgedoc_host_port }}:3000" - "{{ hedgedoc_host_port }}:3000"
restart_policy: unless-stopped restart_policy: unless-stopped
env: env:
NODE_ENV: production NODE_ENV: "production"
CMD_DOMAIN: pad.n39.eu CMD_PROTOCOL_USESSL: "true"
CMD_URL_ADDPORT: true CMD_DOMAIN: "pad.n39.eu"
CMD_DB_HOST: hedgedocdb CMD_URL_ADDPORT: "false"
CMD_DB_PORT: 5432 CMD_DB_HOST: "hedgedocdb"
CMD_DB_DIALECT: postgres CMD_DB_PORT: "5432"
CMD_DB_DATABASE: hedgedoc CMD_DB_DIALECT: "postgres"
CMD_DB_USERNAME: hedgedoc CMD_DB_DATABASE: "hedgedoc"
CMD_DB_USERNAME: "hedgedoc"
CMD_DB_PASSWORD: "{{ hedgedoc_postgres_password }}" CMD_DB_PASSWORD: "{{ hedgedoc_postgres_password }}"
volumes: volumes:
- /srv/docker/hedgedoc/data/uploads:/hedgedoc/public/uploads - /srv/data/hedgedoc/data/uploads:/hedgedoc/public/uploads
networks: networks:
- name: hedgedocnet - name: hedgedocnet