Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bensofficial committed Aug 26, 2024
1 parent d64fb84 commit 46b9cef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions roles/proxy/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Check for compatible Ansible version.
- name: Check for compatible Ansible version.
assert:
that: ansible_version.full is version_compare('2.16', '>=')
msg: You need Ansible version 2.16 or higher.

# Setup nginx proxy
- include_tasks: nginx.yml

1 change: 1 addition & 0 deletions roles/proxy/tasks/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
src: artemis-ssh-upstream.conf.j2
dest: /etc/nginx/artemis-ssh-upstream.conf
mode: 0644
when: proxy_forward_ssh
notify: restart nginx

- name: Copy timeouts.conf
Expand Down
6 changes: 3 additions & 3 deletions roles/proxy/templates/nginx_proxy.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ ansible_managed | comment }}

# Load balancing
upstream artemis {
upstream app {
{% if proxy_load_balancing_method is defined %}
{{ proxy_load_balancing_method }};
{% endif %}
Expand Down Expand Up @@ -62,7 +62,7 @@ server {
client_body_buffer_size 1m;

location / {
proxy_pass {{ proxy_node_protocol }}://artemis;
proxy_pass {{ proxy_node_protocol }}://app;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
Expand Down Expand Up @@ -93,7 +93,7 @@ server {
{% endif %}

location /api/authenticate {
proxy_pass http://artemis/api/authenticate;
proxy_pass http://app/api/authenticate;
# For a given violation of the rate limit defined in the zone
# * the first 2 (delay) requests will be allowed without delay
# * the next (burst - delay) request waits until it fits in the rate limit
Expand Down

0 comments on commit 46b9cef

Please sign in to comment.