Skip to content

Deployment

Jakob Panten edited this page Nov 23, 2021 · 2 revisions

Server Setup

staging

We have a server provided by the HTW Rechenzentrum. It is a Debian 10 Linux server. We are using it in order to showcase/stage our application HTW internally (VPN) and especially for the IMI showtime on 11.02.2022 to the participants.

Technical details

There are two users (local, root) from which we use local to setup everything over SSH. Therefore the port 22 (ssh) has to be open. Also the ports 80 (http) and 443 (https) need to be open to serve the application.

On the server we use the following for serving our application:

nginx configuration

server {
	listen 80;
	listen [::]:80;
	server_name s-potify.fun www.s-potify.fun;
	return 302 https://$server_name$request_uri;
}

server {
	# SSL configuration
	listen 443 ssl http2;
	listen [::]:443 ssl http2;
	ssl_certificate         /etc/ssl/cert.pem;
	ssl_certificate_key     /etc/ssl/key.pem;
        server_name s-potify.fun www.s-potify.fun;

        root /var/www/html/;
	index index.html index.htm index.nginx-debian.html;
	
        location /api/ {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-NginX-Proxy true;
                proxy_pass http://localhost:5000/api/;
                proxy_ssl_session_reuse off;
                proxy_set_header Host $http_host;
                proxy_cache_bypass $http_upgrade;
                proxy_redirect off;
        }
}

Deployment flow

Clone this wiki locally