Move from docker hub to scaleway registry
This commit is contained in:
parent
830729a1d4
commit
f163a56b7f
2 changed files with 9 additions and 7 deletions
12
.build.yml
12
.build.yml
|
@ -9,17 +9,19 @@ secrets:
|
||||||
- 5c948915-48c2-4542-8fc1-a5676f4d7126
|
- 5c948915-48c2-4542-8fc1-a5676f4d7126
|
||||||
environment:
|
environment:
|
||||||
TESTING: true
|
TESTING: true
|
||||||
|
BLOG_TESTS: rg.fr-par.scw.cloud/crocmagnon/blog:tests
|
||||||
|
BLOG_LATEST: rg.fr-par.scw.cloud/crocmagnon/blog:latest
|
||||||
tasks:
|
tasks:
|
||||||
- setup_docker: |
|
- setup_docker: |
|
||||||
./blog/docker/setup-docker
|
./blog/docker/setup-docker
|
||||||
- build_and_test: |
|
- build_and_test: |
|
||||||
docker login -u crocmagnon --password-stdin < .docker-secret
|
docker login -u crocmagnon --password-stdin < .docker-secret
|
||||||
cd blog
|
cd blog
|
||||||
docker pull crocmagnon/blog:latest || true
|
docker pull $BLOG_IMAGE || true
|
||||||
docker build --pull --cache-from crocmagnon/blog:latest -t crocmagnon/blog:latest -f Dockerfile .
|
docker build --pull --cache-from $BLOG_LATEST -t $BLOG_LATEST -f Dockerfile .
|
||||||
docker build -t crocmagnon/blog:tests -f tests.Dockerfile .
|
docker build -t $BLOG_TESTS -f tests.Dockerfile .
|
||||||
docker run --rm -t crocmagnon/blog:tests /app/docker/runtests.sh
|
docker run --rm -t $BLOG_TESTS /app/docker/runtests.sh
|
||||||
docker push crocmagnon/blog:latest
|
docker push $BLOG_LATEST
|
||||||
- deploy: |
|
- deploy: |
|
||||||
ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy"
|
ssh blog -o StrictHostKeyChecking=no "/srv/blog/redeploy"
|
||||||
triggers:
|
triggers:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version: '2.4'
|
version: '2.4'
|
||||||
services:
|
services:
|
||||||
django:
|
django:
|
||||||
image: crocmagnon/blog:latest
|
image: rg.fr-par.scw.cloud/crocmagnon/blog:latest
|
||||||
build: .
|
build: .
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
@ -23,7 +23,7 @@ services:
|
||||||
- media:/app/media
|
- media:/app/media
|
||||||
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
|
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
tests:
|
tests:
|
||||||
image: crocmagnon/blog:tests
|
image: rg.fr-par.scw.cloud/crocmagnon/blog:tests
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: tests.Dockerfile
|
dockerfile: tests.Dockerfile
|
||||||
|
|
Reference in a new issue