inital systemd file
This commit is contained in:
parent
1baf6b175c
commit
51250e786d
2 changed files with 41 additions and 0 deletions
19
contrib/systemd/zammad.service
Normal file
19
contrib/systemd/zammad.service
Normal file
|
@ -0,0 +1,19 @@
|
|||
[Unit]
|
||||
Description=Zammad
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=<zammad
|
||||
Group=zammad
|
||||
|
||||
ExecStart=bash -l -c "RAILS_ENV=production bundle exec script/websocket-server.rb start -d -i tmp/pids/websocket.pid -p 6042 -b 127.0.0.1"
|
||||
|
||||
ExecStop=bash -l -c "RAILS_ENV=production bundle exec script/websocket-server.rb stop -d -i tmp/pids/websocket.pid -p 6042 -b 127.0.0.1"
|
||||
|
||||
# Give a reasonable amount of time for the server to start up/shut down
|
||||
TimeoutSec=300
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
22
extras/zammad_nginx.conf
Normal file
22
extras/zammad_nginx.conf
Normal file
|
@ -0,0 +1,22 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name SERVER_NAME;
|
||||
root /opt/zammad/zammad/public;
|
||||
|
||||
location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
|
||||
expires max;
|
||||
}
|
||||
|
||||
location /ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_pass http://localhost:6042;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://localhost:3000;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue