diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7326fca74f2891d16f1d09c992af717242d1df08..85bc83b5e4b7b7617be6380796ae211b67f54814 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,54 +1,19 @@
-stages:
-  - build
-  - test
-  - deploy
-
-variables:
-  IMAGE: ${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}
-  HEROKU_APP_NAME: safe-meadow-86842
-
-build:
-  stage: build
-  image: docker:stable
-  services:
-    - docker:dind
-  variables:
-    DOCKER_DRIVER: overlay2
-  script:
-    - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
-    - docker pull $IMAGE:build-python || true
-    - docker pull $IMAGE:production || true
-    - docker build
-      --target build-python
-      --cache-from $IMAGE:build-python
-      --tag $IMAGE:build-python
-      --file ./Dockerfile
-      "."
-    - docker build
-      --cache-from $IMAGE:production
-      --tag $IMAGE:production
-      --file ./Dockerfile
-      "."
-    - docker push $IMAGE:build-python
-    - docker push $IMAGE:production
-
+image: python:3
 test:
-  stage: test
-  image: $IMAGE:production
-  services:
-    - postgres:latest
-  variables:
-    POSTGRES_DB: test
-    POSTGRES_USER: runner
-    POSTGRES_PASSWORD: ""
-    DATABASE_URL: postgres://runner@postgres:5432/test
   script:
-    - python manage.py test
+  # this configures Django application to use attached postgres database that is run on `postgres` host
+  - cd backend/secfit
+  - apt-get update -qy
+  - pip install -r requirements.txt
+  - python manage.py test
 
-deploy:
-  stage: deploy
+staging:
+  type: deploy
+  image: ruby
   script:
-    - apt-get update -qy
-    - apt-get install -y ruby-dev
-    - gem install dpl
-    - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_AUTH_TOKEN
\ No newline at end of file
+  - apt-get update -qy
+  - apt-get install -y ruby-dev
+  - gem install dpl
+  - dpl --provider=heroku --app=tdt4237 --api-key=$HEROKU_STAGING_API_KEY
+  only:
+  - master
diff --git a/heroku.yml b/heroku.yml
deleted file mode 100644
index 8eec25b9c99a95f6b60ea0d36bd6ca9cbdcea355..0000000000000000000000000000000000000000
--- a/heroku.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-build:
-  docker:
-    web: Dockerfile