Skip to content

Commit 337794d

Browse files
ocrvs-botalsmkrikukissa
authored
🍒 Merge changes from PR #317 to release-v1.6.1 (#319)
Co-authored-by: Al hel md. shahriar zaman <[email protected]> Co-authored-by: Riku Rouvila <[email protected]>
1 parent 87f8ce4 commit 337794d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 1.6.1 (TBD)
44

5+
### Bug fixes
6+
7+
- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).
8+
59
## 1.6.0
610

711
### Breaking changes

infrastructure/deployment/deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ split_and_join() {
268268
SPLIT=$(echo $text | sed -e "s/$separator_for_splitting/$separator_for_joining/g")
269269
echo $SPLIT
270270
}
271+
cleanup_docker_images()
272+
{
273+
echo "Cleaning up the docker images"
274+
/usr/bin/docker system prune -af | sudo tee -a /var/log/docker-prune.log > /dev/null
275+
}
271276

272277
docker_stack_deploy() {
273278
echo "Deploying this environment: $ENVIRONMENT_COMPOSE"
@@ -378,6 +383,8 @@ configured_ssh "/opt/opencrvs/infrastructure/setup-deploy-config.sh $HOST"
378383

379384
rotate_secrets
380385

386+
cleanup_docker_images
387+
381388
docker_stack_deploy
382389

383390
echo

infrastructure/server-setup/tasks/docker.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@
4545
cron:
4646
user: '{{ crontab_user }}'
4747
name: 'cleanup docker images'
48-
minute: '0'
49-
hour: '0'
5048
job: '/usr/bin/docker system prune -af >> /var/log/docker-prune.log'
49+
state: absent
5150

5251
- name: Check if Docker group exists
5352
command: getent group docker

0 commit comments

Comments
 (0)