diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 072162e..9827cce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,8 +19,9 @@ docker-build: --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${DOCKER_IMAGE_NAME}" - --build-arg "VITE_BACKEND_URL=${VITE_BACKEND_URL}" - --build-arg "LOCAL_DNS=${LOCAL_DNS}" + --build-arg "VITE_BACKEND_URL=http://olympus-gateway.gcp.it/hermione" + --build-arg "IP_ADDRESS=34.159.118.61" + --build-arg "LOCAL_DNS=olympus-gateway.gcp.it" # Run this job in a branch where a Dockerfile exists rules: - if: $CI_COMMIT_BRANCH diff --git a/Dockerfile b/Dockerfile index 1d49249..4a4d99a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,8 @@ FROM nginx:latest as prod # Add custom DNS mapping ARG LOCAL_DNS -RUN echo "$LOCAL_DNS" >> /etc/hosts +ARG IP_ADDRESS +RUN echo "$IP_ADDRESS $LOCAL_DNS" >> /etc/hosts RUN cat /etc/hosts