From fb9ea583e0ea4e417d314cfe099ffd0875ba1360 Mon Sep 17 00:00:00 2001 From: henridb <henridb@stud.ntnu.no> Date: Thu, 2 May 2024 20:49:42 +0200 Subject: [PATCH] fix: fix 11 --- .gitlab-ci.yml | 2 +- Dockerfile | 11 +++++------ web/nginx.conf | 7 ++++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 077b8fc..15c7862 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,5 +36,5 @@ deploy_docker: - apt-get -yqq install ssh - apt-get install sshpass script: - - sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker rm -f frontend || true; docker run -d --name frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend" + - sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker rm -f frontend || true; docker run -d --name -p 80:5173 frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend" when: manual \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a2ef316..a3c7312 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,10 @@ RUN npm install COPY . . RUN npm run build -# Step 2: Setup the server with Nginx -FROM nginx:stable-alpine as production-stage -COPY --from=build-stage /app/dist /usr/share/nginx/html -COPY web/nginx.conf /etc/nginx/nginx.conf -EXPOSE 5173 +# Step 2: Setup the server with Nginx +#FROM nginx:stable-alpine as production-stage +#COPY --from=build-stage /app/dist /usr/share/nginx/html +#COPY web/nginx.conf /etc/nginx/nginx.conf -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +#CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/web/nginx.conf b/web/nginx.conf index 5f7a53b..8c8fc61 100644 --- a/web/nginx.conf +++ b/web/nginx.conf @@ -1,5 +1,10 @@ -events { +worker_processes auto; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; +events { + worker_connections 1024; } http { -- GitLab