dokku / ansible-dokku

Ansible modules for installing and configuring Dokku
MIT License
169 stars 44 forks source link

Feature request: `dokku nginx:set` support #140

Open louwers opened 2 years ago

louwers commented 2 years ago

Would be cool if support for dokku nginx:set could be added.

Right now I am doing this, which seems to work well:

    - name: check client-max-body-size
      command: dokku nginx:report {{ app_name }} --nginx-client-max-body-size 2>/dev/null
      register: client_max_body_size
      changed_when: false

    - name: set client-max-body-size
      vars:
        max_filesize: 500m
      ansible.builtin.shell: dokku nginx:set {{ app_name }} client-max-body-size {{ max_filesize }}
      when: "client_max_body_size.stdout != max_filesize"
      notify:
      - Rebuild config

  handlers:
    - name: Rebuild config
      command: dokku proxy:build-config --all
ltalirz commented 2 years ago

Sounds good - if anyone is interested in adding a dokku_nginx_set ansible module, I can suggest having a look e.g. at the dokku_config module

ovitente commented 8 months ago

Is there any progress with it? For now, I am using a workaround like this

- name: Set Nginx Proxy Read Timeout
  shell: 'dokku nginx:set app-name proxy-read-timeout 300'
ltalirz commented 8 months ago

https://github.com/dokku/ansible-dokku/issues/169