From 2d34b1f19448d9dce0fd9b6080c02f260c670bdc Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Thu, 31 Jul 2025 15:51:01 +0200 Subject: [PATCH 1/2] Add carculator service --- conf.d/carculator.conf | 19 +++++++++++++++++++ docker-compose.yaml | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 conf.d/carculator.conf diff --git a/conf.d/carculator.conf b/conf.d/carculator.conf new file mode 100644 index 0000000..5e0491d --- /dev/null +++ b/conf.d/carculator.conf @@ -0,0 +1,19 @@ +server { + listen 80; + server_name carculator-api.psi.ch; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl; + server_name carculator-api.psi.ch; + + + location / { + proxy_pass http://carculator:8000; + 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 8ca5fd0..6388cf0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -58,6 +58,15 @@ services: networks: - backend + # Romain Sacchi + # Software host and access to the Internet + carculator: + image: gitea.psi.ch/sacchi_r/carculator:0.1.0 + container_name: carculator + restart: always + networks: + - backend + # Augustin Sven hedgedoc_app: image: quay.io/hedgedoc/hedgedoc:1.10.1 From 0e38bd84aa549752aa8f91d9e63c6c025f4c0c6b Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Mon, 4 Aug 2025 16:21:43 +0200 Subject: [PATCH 2/2] Change server_name to carculator-api-test.psi.ch for test deployment --- conf.d/carculator.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.d/carculator.conf b/conf.d/carculator.conf index 5e0491d..767515e 100644 --- a/conf.d/carculator.conf +++ b/conf.d/carculator.conf @@ -1,12 +1,12 @@ server { listen 80; - server_name carculator-api.psi.ch; + server_name carculator-api-test.psi.ch; return 301 https://$host$request_uri; } server { listen 443 ssl; - server_name carculator-api.psi.ch; + server_name carculator-api-test.psi.ch; location / {