Try to pull image
This commit is contained in:
parent
13161682c4
commit
9636545980
@ -43,15 +43,16 @@ jobs:
|
|||||||
- run: docker build --file ./docker/Dockerfile.prod --tag cr.yandex/crplfk0168i4o8kd7ade/dayoff .
|
- run: docker build --file ./docker/Dockerfile.prod --tag cr.yandex/crplfk0168i4o8kd7ade/dayoff .
|
||||||
- run: docker push cr.yandex/crplfk0168i4o8kd7ade/dayoff
|
- run: docker push cr.yandex/crplfk0168i4o8kd7ade/dayoff
|
||||||
|
|
||||||
# deploy_app:
|
deploy_app:
|
||||||
# docker:
|
docker:
|
||||||
# - image: alpine:3.10.3
|
- image: alpine:3.10.3
|
||||||
# steps:
|
steps:
|
||||||
# - checkout
|
- checkout
|
||||||
# - add_ssh_keys
|
- add_ssh_keys
|
||||||
# - run: apk add -u openssh-client
|
- run: apk add -u openssh-client
|
||||||
# - run: ssh-keyscan vakhrushev.me >> ~/.ssh/known_hosts
|
- run: ssh-keyscan vakhrushev.me >> ~/.ssh/known_hosts
|
||||||
# - run: cat docker/deploy-prod | ssh dayoff@vakhrushev.me
|
- run: echo "$YANDEX_CLOUD_DOCKER_REGISTRY_KEY" | ssh dayoff@vakhrushev.me -T "cat > /home/dayoff/yandex_cloud_docker_registry_key.json"
|
||||||
|
- run: cat docker/deploy-prod | "$YANDEX_CLOUD_DOCKER_REGISTRY_KEY=$YANDEX_CLOUD_DOCKER_REGISTRY_KEY ssh dayoff@vakhrushev.me"
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
@ -66,9 +67,9 @@ workflows:
|
|||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
# - deploy_app:
|
- deploy_app:
|
||||||
# requires:
|
requires:
|
||||||
# - build_docker_image
|
- build_docker_image
|
||||||
# filters:
|
filters:
|
||||||
# branches:
|
branches:
|
||||||
# only: master
|
only: master
|
||||||
|
@ -4,7 +4,7 @@ set -eux
|
|||||||
|
|
||||||
source /home/dayoff/.env
|
source /home/dayoff/.env
|
||||||
|
|
||||||
IMAGE=anwinged/dayoff
|
IMAGE=cr.yandex/crplfk0168i4o8kd7ade/dayoff
|
||||||
DATA_PATH=/home/dayoff/data
|
DATA_PATH=/home/dayoff/data
|
||||||
CONTAINER_NAME="${CONTAINER_PREFIX}-server"
|
CONTAINER_NAME="${CONTAINER_PREFIX}-server"
|
||||||
|
|
||||||
@ -16,6 +16,8 @@ if [ -t 1 ] ; then
|
|||||||
TTY=-t
|
TTY=-t
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$YANDEX_CLOUD_DOCKER_REGISTRY_KEY" | docker login --username json_key --password-stdin cr.yandex
|
||||||
|
|
||||||
docker pull "${IMAGE}"
|
docker pull "${IMAGE}"
|
||||||
|
|
||||||
docker stop "${CONTAINER_NAME}" || true
|
docker stop "${CONTAINER_NAME}" || true
|
||||||
|
Loading…
Reference in New Issue
Block a user