Prune old images on deploy host after deployment
This commit is contained in:
+1
-1
@@ -73,4 +73,4 @@ deploy:
|
|||||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||||
script:
|
script:
|
||||||
- scp docker-compose.yml $SSH_USER@$SSH_HOST:~/deployment/docker-compose.yml
|
- scp docker-compose.yml $SSH_USER@$SSH_HOST:~/deployment/docker-compose.yml
|
||||||
- ssh $SSH_USER@$SSH_HOST "cd deployment && docker-compose down && docker pull \"$IMAGE_NAME\" && docker-compose up -d"
|
- ssh $SSH_USER@$SSH_HOST "cd deployment && docker-compose down && docker pull \"$IMAGE_NAME\" && docker-compose up -d && docker image prune -f"
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
image: 86.50.143.82:5000/web20
|
image: 86.50.143.82:5000/web20
|
||||||
command: ["bash", "-c", "cd /code && ./wait-for-it.sh db:5432 -- bash setup.sh --no-input --no-npm && python manage.py runserver 0.0.0.0:8080"]
|
command: ["bash", "-c", "cd /code && ./wait-for-it.sh db:5432 -- bash setup.sh --no-input --no-npm && python manage.py runserver 0.0.0.0:8080"]
|
||||||
volumes:
|
|
||||||
- .:/code
|
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user