mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 04:09:25 +08:00
Hide image tag in .woodpecker.yml
This commit is contained in:
parent
44ba296353
commit
079a63f69f
1 changed files with 8 additions and 10 deletions
|
@ -6,12 +6,12 @@ steps:
|
|||
- branch: master
|
||||
- event: push
|
||||
commands:
|
||||
- docker build . -t git.keannu1.duckdns.org/keannu125/drf_template
|
||||
- echo "$REGISTRY_PASSWORD" | docker login git.keannu1.duckdns.org --password-stdin -u "$REGISTRY_USERNAME"
|
||||
- docker push git.keannu1.duckdns.org/keannu125/drf_template
|
||||
- docker build . -t "$IMAGE_TAG"
|
||||
- echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY" --password-stdin -u "$REGISTRY_USERNAME"
|
||||
- docker push "$IMAGE_TAG"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
secrets: [REGISTRY_USERNAME, REGISTRY_PASSWORD]
|
||||
secrets: [IMAGE_TAG, REGISTRY, REGISTRY_USERNAME, REGISTRY_PASSWORD]
|
||||
- name: update deployment and reset database
|
||||
image: docker
|
||||
when:
|
||||
|
@ -25,10 +25,8 @@ steps:
|
|||
- ssh root@10.0.10.4 '
|
||||
cd $PROJECT_DIR;
|
||||
docker-compose down;
|
||||
docker image rm git.keannu1.duckdns.org/keannu125/drf_template || true;
|
||||
docker pull git.keannu1.duckdns.org/keannu125/drf_template:latest;
|
||||
docker volume rm git.keannu1.duckdns.org/keannu125/drf_template_db_data || true;
|
||||
docker image rm "$IMAGE_TAG" || true;
|
||||
docker pull "$IMAGE_TAG":latest;
|
||||
docker volume rm "$IMAGE_TAG"_db_data || true;
|
||||
docker compose up -d'
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
secrets: [SSH_KEY, PROJECT_DIR]
|
||||
secrets: [IMAGE_TAG, SSH_KEY, PROJECT_DIR]
|
||||
|
|
Loading…
Reference in a new issue