diff --git a/conf.d/n8n.conf b/conf.d/n8n.conf new file mode 100644 index 0000000..95e62be --- /dev/null +++ b/conf.d/n8n.conf @@ -0,0 +1,21 @@ +server { + listen 80; + server_name n8n.psi.ch; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name n8n.psi.ch; + + ssl_certificate /etc/nginx/certs/n8n.psi.ch.crt; + ssl_certificate_key /etc/nginx/private/n8n.psi.ch.key; + + location / { + proxy_pass http://n8n:5678; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} diff --git a/docker-compose.yaml b/docker-compose.yaml index 6388cf0..9e92ec2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,8 @@ services: # linux-eng@psi.ch + # Reverse Proxy handling all HTTP/HTTPS requests + # Only container that is exposed to the network + # Communication to other services is trough docker network nginx: image: nginx:latest container_name: nginx_proxy @@ -18,6 +21,7 @@ services: - backend # linux-eng@psi.ch + # Test app excalidraw: image: excalidraw/excalidraw:latest container_name: excalidraw @@ -27,6 +31,7 @@ services: # Rostomyan Tigran # INC0137443 + # Elog instance pif-elog: image: gitea.psi.ch/images/elog:3.1.5 container_name: pif-elog @@ -50,7 +55,8 @@ services: - backend # Huang He - # Software host and access to Internet linux-eng@psi.ch + # Also installed on docker-dmz + # PSI Service mcda-calculator: image: gitea.psi.ch/images/mcda-calculator:1.0.3 container_name: mcda-calculator @@ -59,7 +65,8 @@ services: - backend # Romain Sacchi - # Software host and access to the Internet + # Also installed on docker-dmz + # PSI Service carculator: image: gitea.psi.ch/sacchi_r/carculator:0.1.0 container_name: carculator @@ -68,6 +75,7 @@ services: - backend # Augustin Sven + # POC for SiwssFel hedgedoc_app: image: quay.io/hedgedoc/hedgedoc:1.10.1 container_name: hedgedoc @@ -110,7 +118,8 @@ services: networks: - hedgedoc_backend - #Andreas Luedeke + # Andreas Luedeke + # POC not running yet gfa-status-test: image: php:8.2-apache container_name: gfa-status-test @@ -121,6 +130,7 @@ services: - backend # Sven Augustin -Hax0rL0rd + # CI/CD Aaddition to Gitea (Jenkins for poor people) woodpecker-server: image: woodpeckerci/woodpecker-server:next container_name: woodpecker_server @@ -156,6 +166,23 @@ services: networks: - woodpecker_backend + # Angelo Sozzi INC0150655 angelo.sozzi@psi.ch + # POC Software - might be installed on docker-dmz + n8n: + image: docker.n8n.io/n8nio/n8n + container_name: n8n + restart: always + environment: + - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME} + - N8N_PORT=5678 + - N8N_PROTOCOL=https + - NODE_ENV=production + - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/ + - GENERIC_TIMEZONE=${GENERIC_TIMEZONE} + volumes: + - /opt/webcontent/n8n/n8n_data:/home/node/.n8n + - /opt/webcontent/n8n/local_files:/files + networks: public: backend: