From 6fa12939b89dd6b4abe8626f8f4e2a5ec5a020f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com>
Date: Mon, 16 Oct 2023 15:10:16 +0200
Subject: [PATCH] Remove nginx from deployment

---
 .gitlab-ci.yml   |  9 ---------
 Dockerfile.nginx |  3 ---
 nginx.conf       | 23 -----------------------
 3 files changed, 35 deletions(-)
 delete mode 100644 Dockerfile.nginx
 delete mode 100644 nginx.conf

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cae401b..8c91786 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,6 @@ image: docker:20.10.8
 variables:
   DOCKER_TLS_CERTDIR: "/certs"
   IMAGE_TAG_APP: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
-  IMAGE_TAG_NGINX: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-nginx
 
 services:
   - docker:20.10.8-dind
@@ -20,11 +19,3 @@ build_app:
     - docker pull $CI_REGISTRY_IMAGE:test || true
     - docker build --cache-from $CI_REGISTRY_IMAGE:test -t $IMAGE_TAG_APP .
     - docker push $IMAGE_TAG_APP
-
-build_nginx:
-  stage: build
-  when: manual
-  script:
-    - docker pull $CI_REGISTRY_IMAGE:test-nginx || true
-    - docker build --cache-from $CI_REGISTRY_IMAGE:test-nginx -t $IMAGE_TAG_NGINX . -f Dockerfile.nginx
-    - docker push $IMAGE_TAG_NGINX
diff --git a/Dockerfile.nginx b/Dockerfile.nginx
deleted file mode 100644
index 162c997..0000000
--- a/Dockerfile.nginx
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM nginx:1.18
-EXPOSE 8080
-ADD nginx.conf /etc/nginx/conf.d/helios.conf
diff --git a/nginx.conf b/nginx.conf
deleted file mode 100644
index c574030..0000000
--- a/nginx.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-upstream helios {
-    ip_hash;
-    server app:8000;
-}
-
-server {
-    server_name helios;
-    listen 8080;
-
-    client_max_body_size 10M;
-
-    proxy_connect_timeout   60;
-    proxy_send_timeout      60;
-    proxy_read_timeout      60;
-    send_timeout            60;
-
-    location / {
-        proxy_pass http://helios/;
-        proxy_set_header Host $host;
-        proxy_set_header X-Forwarded-Proto https;
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-    }
-}
-- 
GitLab