diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..c5933ced265f6bdfa936164bbea67322fcf31db1 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: docker:19.03.0 + +services: + - docker:19.03.0-dind + +stages: + - build + +before_script: + - docker info + +docker_build: + stage: build + script: + - apk add --no-cache curl + - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com + - docker pull registry.heroku.com/secfit-group15/web + - docker build + --cache-from registry.heroku.com/secfit-group15/web + --tag registry.heroku.com/secfit-group15/web + --file ./Dockerfile + "." + - docker push registry.heroku.com/secfit-group15/web + diff --git a/Dockerfile b/Dockerfile index 23c4ac6b826c7ae46f7b916546205b5522a8682b..393fb090fb9e68705922fa901f3c893dd53c681c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ ENV GROUPID=${GROUPID} ENV PORT_PREFIX=${PORT_PREFIX} # Copy nginx config to the container -COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/backend/secfit/secfit/settings.py b/backend/secfit/secfit/settings.py index 92336536fbb75beeade6bfc8e60eb393531832c9..af44b5944913cfab8164f2ad63f5f16c2b4538e0 100644 --- a/backend/secfit/secfit/settings.py +++ b/backend/secfit/secfit/settings.py @@ -43,6 +43,9 @@ ALLOWED_HOSTS = [ "10." + groupid + ".0.4", "molde.idi.ntnu.no", "10.0.2.2", + "secfit-group15-staging.herokuapp.com", + "secfit-group15-production.herokuapp.com", + "secfit-group15.herokuapp.com" ] # Application definition