Skip to content
Snippets Groups Projects
Commit 6fa12939 authored by jan.bednarik's avatar jan.bednarik
Browse files

Remove nginx from deployment

parent 54e94f9e
No related branches found
No related tags found
2 merge requests!30Release,!29Api
Pipeline #15031 passed
...@@ -6,7 +6,6 @@ image: docker:20.10.8 ...@@ -6,7 +6,6 @@ image: docker:20.10.8
variables: variables:
DOCKER_TLS_CERTDIR: "/certs" DOCKER_TLS_CERTDIR: "/certs"
IMAGE_TAG_APP: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG IMAGE_TAG_APP: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
IMAGE_TAG_NGINX: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-nginx
services: services:
- docker:20.10.8-dind - docker:20.10.8-dind
...@@ -20,11 +19,3 @@ build_app: ...@@ -20,11 +19,3 @@ build_app:
- docker pull $CI_REGISTRY_IMAGE:test || true - docker pull $CI_REGISTRY_IMAGE:test || true
- docker build --cache-from $CI_REGISTRY_IMAGE:test -t $IMAGE_TAG_APP . - docker build --cache-from $CI_REGISTRY_IMAGE:test -t $IMAGE_TAG_APP .
- docker push $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
FROM nginx:1.18
EXPOSE 8080
ADD nginx.conf /etc/nginx/conf.d/helios.conf
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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment