Verified Commit 5f7f5d92 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Switch to docker hub for images

parent 641dccde
...@@ -81,16 +81,17 @@ build docker image: ...@@ -81,16 +81,17 @@ build docker image:
tags: tags:
- docker - docker
before_script: before_script:
- echo $GITLAB_REGISTRY_PASSWORD | docker login --username thaliawww --password-stdin registry.gitlab.com - echo $DOCKER_REGISTRY_PASSWORD | docker login --username thaliawww --password-stdin registry.hub.docker.com
script: script:
- docker-compose config -q - docker-compose config -q
- docker-compose build --build-arg install_dev_requirements=0 --build-arg source_commit=$(git rev-parse HEAD) web - docker-compose build --build-arg install_dev_requirements=0 --build-arg source_commit=$(git rev-parse HEAD) web
- docker-compose run --rm web test - docker-compose run --rm web test
- docker tag $DOCKER_LATEST $DOCKER_TAG - docker tag $DOCKER_LATEST $DOCKER_TAG
- docker push $DOCKER_LATEST
- docker push $DOCKER_TAG - docker push $DOCKER_TAG
variables: variables:
DOCKER_LATEST: registry.gitlab.com/thaliawww/concrexit:latest DOCKER_LATEST: registry.hub.docker.com/thalia/concrexit:latest
DOCKER_TAG: registry.gitlab.com/thaliawww/concrexit:$CI_COMMIT_SHA DOCKER_TAG: registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_SHA
tag docker image: tag docker image:
stage: deploy stage: deploy
...@@ -104,14 +105,14 @@ tag docker image: ...@@ -104,14 +105,14 @@ tag docker image:
dependencies: dependencies:
- build docker image - build docker image
before_script: before_script:
- echo $GITLAB_REGISTRY_PASSWORD | docker login --username thaliawww --password-stdin registry.gitlab.com - echo $DOCKER_REGISTRY_PASSWORD | docker login --username thaliawww --password-stdin registry.hub.docker.com
script: script:
- docker pull $DOCKER_TAG - docker pull $DOCKER_TAG
- docker tag $DOCKER_TAG $DOCKER_TAG_PRODUCTION - docker tag $DOCKER_TAG $DOCKER_TAG_PRODUCTION
- docker push $DOCKER_TAG_PRODUCTION - docker push $DOCKER_TAG_PRODUCTION
variables: variables:
DOCKER_TAG: registry.gitlab.com/thaliawww/concrexit:$CI_COMMIT_SHA DOCKER_TAG: registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_SHA
DOCKER_TAG_PRODUCTION: registry.gitlab.com/thaliawww/concrexit:$CI_COMMIT_TAG DOCKER_TAG_PRODUCTION: registry.hub.docker.com/thalia/concrexit:$CI_COMMIT_TAG
cache: cache:
......
...@@ -8,7 +8,7 @@ services: ...@@ -8,7 +8,7 @@ services:
environment: &postgresvars environment: &postgresvars
POSTGRES_DB: thalia POSTGRES_DB: thalia
web: web:
image: registry.gitlab.com/thaliawww/concrexit image: registry.hub.docker.com/thalia/concrexit
build: . build: .
command: runserver 0.0.0.0:8000 command: runserver 0.0.0.0:8000
ports: ports:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment