From f163a56b7f2b8f47e6c040a8f7bd6fa29d3522ef Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 12 Sep 2020 15:07:21 +0200 Subject: [PATCH] Move from docker hub to scaleway registry --- .build.yml | 12 +++++++----- docker-compose.yml | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.build.yml b/.build.yml index 752ef11..b26ff43 100644 --- a/.build.yml +++ b/.build.yml @@ -9,17 +9,19 @@ secrets: - 5c948915-48c2-4542-8fc1-a5676f4d7126 environment: TESTING: true + BLOG_TESTS: rg.fr-par.scw.cloud/crocmagnon/blog:tests + BLOG_LATEST: rg.fr-par.scw.cloud/crocmagnon/blog:latest tasks: - setup_docker: | ./blog/docker/setup-docker - build_and_test: | docker login -u crocmagnon --password-stdin < .docker-secret cd blog - docker pull crocmagnon/blog:latest || true - docker build --pull --cache-from crocmagnon/blog:latest -t crocmagnon/blog:latest -f Dockerfile . - docker build -t crocmagnon/blog:tests -f tests.Dockerfile . - docker run --rm -t crocmagnon/blog:tests /app/docker/runtests.sh - docker push crocmagnon/blog:latest + docker pull $BLOG_IMAGE || true + docker build --pull --cache-from $BLOG_LATEST -t $BLOG_LATEST -f Dockerfile . + docker build -t $BLOG_TESTS -f tests.Dockerfile . + docker run --rm -t $BLOG_TESTS /app/docker/runtests.sh + docker push $BLOG_LATEST - deploy: | ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy" triggers: diff --git a/docker-compose.yml b/docker-compose.yml index baf367b..040ef2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '2.4' services: django: - image: crocmagnon/blog:latest + image: rg.fr-par.scw.cloud/crocmagnon/blog:latest build: . env_file: - .env @@ -23,7 +23,7 @@ services: - media:/app/media - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf tests: - image: crocmagnon/blog:tests + image: rg.fr-par.scw.cloud/crocmagnon/blog:tests build: context: . dockerfile: tests.Dockerfile