diff --git a/files/nginx/error502.html b/files/nginx/error502.html new file mode 100644 index 0000000..9fdb847 --- /dev/null +++ b/files/nginx/error502.html @@ -0,0 +1,16 @@ + + + + + Galaxy on ResearchCloud + + + + +

Welcome To Galaxy on ResearchCloud

+

It looks like Galaxy is not running. Most probably this means Galaxy is still starting up. Please wait!

+

If Galaxy is still not running after ~5 minutes, please contact your sysadmin for support.

+

This page will refresh every 10 seconds.

+ + + \ No newline at end of file diff --git a/galaxysrv.yml b/galaxysrv.yml index 0694050..9f9f9c5 100644 --- a/galaxysrv.yml +++ b/galaxysrv.yml @@ -24,6 +24,9 @@ - 'gnutls-bin' # workaround for git-clone issue, https://stackoverflow.com/a/53147659/4326632 state: present + - name: Additional nginx config + ansible.builtin.include_tasks: tasks/nginx.yml + roles: - role: geerlingguy.docker when: not _molecule_active and _galaxy_enable_docker diff --git a/tasks/nginx.yml b/tasks/nginx.yml new file mode 100644 index 0000000..374d409 --- /dev/null +++ b/tasks/nginx.yml @@ -0,0 +1,9 @@ +--- + +- name: Add custom 502 page + ansible.builtin.copy: + src: nginx/error502.html + dest: "{{ _galaxy_error_502 }}" + owner: www-data + group: www-data + mode: "0740" diff --git a/vars/internal_vars.yml b/vars/internal_vars.yml index 52c8704..741a8cb 100644 --- a/vars/internal_vars.yml +++ b/vars/internal_vars.yml @@ -17,6 +17,7 @@ _galaxy_custom_repo_workflow_location: 'workflows' _galaxy_root: /srv/galaxy _galaxy_local_address: localhost:8080 +_galaxy_error_502: /var/www/galaxy500.html galaxy_src_documentation: https://github.com/UtrechtUniversity/vre-docs diff --git a/vars/nginx_vars.yml b/vars/nginx_vars.yml index e850698..52a3666 100644 --- a/vars/nginx_vars.yml +++ b/vars/nginx_vars.yml @@ -1,6 +1,7 @@ galaxy_nginx_vhost_config: - name: galaxy location: / + error_page: 502 /err_502.html proxy_pass: "http://{{ _galaxy_local_address }}" auth: "{{ _molecule_active | ternary(omit, 'sram') }}" proxy_set_header: @@ -27,3 +28,7 @@ galaxy_nginx_vhost_config: proxy_redirect: 'off' proxy_http_version: '1.1' proxy_pass: "http://localhost:{{ gie_proxy_port }}" + - name: custom_errpage + location: = /err_502.html + root: "{{ _galaxy_error_502 }}" + internal: ''