Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- Protect individual certificate endpoint with token
- Kibana disk space alerts now work regardless of your disk device names. Alerts listen devices mounted both to `/` and `/data` (encrypted data partition)
- "Publish release" pipeline now correctly uses the "Branch to build from" value as the branch to be tagged. Previously it tried tagging "master". "Release tag" is also now used as the release version as is instead of it being read from `package.json`.
- Backup process now doesn't require internet connection to download docker images thus working more reliably when internet connections are unreliable. Previously non-active images were cleaned nightly, now we only do it as part of deployment. [#7896](https://github.com/opencrvs/opencrvs-core/issues/7896)
- We make sure that the automatic cleanup job only runs before deployment (instead of cron schedule cleanup).

### Breaking changes

Expand Down
7 changes: 7 additions & 0 deletions infrastructure/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ split_and_join() {
SPLIT=$(echo $text | sed -e "s/$separator_for_splitting/$separator_for_joining/g")
echo $SPLIT
}
cleanup_docker_images()
{
echo "Cleaning up the docker images"
/usr/bin/docker system prune -af | sudo tee -a /var/log/docker-prune.log > /dev/null
}

docker_stack_deploy() {
echo "Deploying this environment: $ENVIRONMENT_COMPOSE"
Expand Down Expand Up @@ -379,6 +384,8 @@ configured_ssh "/opt/opencrvs/infrastructure/setup-deploy-config.sh $HOST"

rotate_secrets

cleanup_docker_images

docker_stack_deploy

echo
Expand Down
3 changes: 1 addition & 2 deletions infrastructure/server-setup/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
cron:
user: '{{ crontab_user }}'
name: 'cleanup docker images'
minute: '0'
hour: '0'
job: '/usr/bin/docker system prune -af >> /var/log/docker-prune.log'
state: absent

- name: Check if Docker group exists
command: getent group docker
Expand Down
Loading