Zammad: Add redis as dependecy for Zammad 6

Remove yarn - it will be installed by rake assets:precompile
This commit is contained in:
phil 2023-06-07 23:17:12 +02:00
parent c54a5dd9f0
commit d166ccd797
4 changed files with 32 additions and 15 deletions

View file

@ -33,18 +33,6 @@
- patch - patch
- pkg-config - pkg-config
- rbenv - rbenv
- redis
- sudo - sudo
- yarnpkg
- zlib1g-dev - zlib1g-dev
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940511
- name: "packages | ensure cmdtest is not installed"
apt:
name: cmdtest
state: absent
- name: "packages | Erstelle yarn-Symlink"
file:
src: /usr/bin/yarnpkg
dest: /usr/local/bin/yarn
state: link

View file

@ -2,11 +2,14 @@
template: template:
src: nginx-site.j2 src: nginx-site.j2
dest: "{{ zammad_webserver_configuration }}" dest: "{{ zammad_webserver_configuration }}"
notify: reload nginx
- name: "webserver: Kofiguration aktivieren" - name: "webserver: Kofiguration aktivieren"
file: file:
src: "{{ zammad_webserver_configuration }}" src: "{{ zammad_webserver_configuration }}"
dest: "/etc/nginx/sites-enabled/{{ zammad_domain }}" dest: "/etc/nginx/sites-enabled/{{ zammad_domain }}"
state: link state: link
notify: reload nginx

View file

@ -11,6 +11,11 @@ server {
ssl_certificate /var/lib/dehydrated/certs/{{ zammad_domain }}/fullchain.pem; ssl_certificate /var/lib/dehydrated/certs/{{ zammad_domain }}/fullchain.pem;
ssl_certificate_key /var/lib/dehydrated/certs/{{ zammad_domain }}/privkey.pem; ssl_certificate_key /var/lib/dehydrated/certs/{{ zammad_domain }}/privkey.pem;
include /etc/nginx/snippets/add_headers.conf; include /etc/nginx/snippets/add_headers.conf;
location /cable {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://{{ inventory_hostname }}:80;
}
location /ws { location /ws {
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade"; proxy_set_header Connection "Upgrade";

View file

@ -1,3 +1,13 @@
### {{ ansible_managed }}
upstream zammad-railsserver {
server 127.0.0.1:3000;
}
upstream zammad-websocket {
server 127.0.0.1:6042;
}
server { server {
listen 80; listen 80;
server_name {{ zammad_domain }}; server_name {{ zammad_domain }};
@ -11,6 +21,17 @@ server {
expires max; expires max;
} }
location /cable {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header CLIENT_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_pass http://zammad-railsserver;
}
location /ws { location /ws {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
@ -18,7 +39,7 @@ server {
proxy_set_header CLIENT_IP $proxy_add_x_forwarded_for; proxy_set_header CLIENT_IP $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400; proxy_read_timeout 86400;
proxy_pass http://127.0.0.1:6042; proxy_pass http://zammad-websocket;
} }
location / { location / {
@ -28,6 +49,6 @@ server {
# Change this line in an SSO setup # Change this line in an SSO setup
proxy_set_header X-Forwarded-User ""; proxy_set_header X-Forwarded-User "";
proxy_read_timeout 300; proxy_read_timeout 300;
proxy_pass http://127.0.0.1:3000; proxy_pass http://zammad-railsserver;
} }
} }