Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Use PostgreSQL latest-slim image (#2458)

Wouter Bornd94854a50f7a
diff --git a/.ci_cd/host_init/healthy.sh b/.ci_cd/host_init/healthy.sh
index a54bc3441..d96b4e88b 100644
--- a/.ci_cd/host_init/healthy.sh
+++ b/.ci_cd/host_init/healthy.sh
@@ -11,9 +11,13 @@ IFS=$'\n'
while [ "$STATUSES_OK" != 'true' ] && [ $COUNT -le 60 ]; do
echo "Checking service health...attempt $COUNT"
- STATUSES=$(docker ps --format "{{.Names}} {{.Status}}" | grep ${1:-""})
+ STATUSES=$(docker ps --format "{{.Names}} {{.Status}}" | grep ${1:-""} || true)
STATUSES_OK=true
+ if [ "$STATUSES" == "" ]; then
+ STATUSES_OK=false
+ fi
+
for STATUS in $STATUSES; do
if [[ "$STATUS" != *"healthy"* ]]; then
STATUSES_OK=false
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml
index 2ba18c89d..ca772e325 100644
--- a/.github/workflows/ci_cd.yml
+++ b/.github/workflows/ci_cd.yml
@@ -110,40 +110,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Free up disk space
- run: |
- echo "Disk space before cleanup:"
- df -h
-
- # Remove large directories
- sudo rm -rf /usr/share/dotnet
- sudo rm -rf /usr/local/lib/android
- sudo rm -rf /opt/ghc
- sudo rm -rf /usr/local/.ghcup
- sudo rm -rf /opt/hostedtoolcache/CodeQL
-
- # Remove large packages
- sudo apt-get remove -y '^aspnetcore-.*' || true
- sudo apt-get remove -y '^dotnet-.*' || true
- sudo apt-get remove -y '^llvm-.*' || true
- sudo apt-get remove -y 'php.*' || true
- sudo apt-get remove -y '^mongodb-.*' || true
- sudo apt-get remove -y '^mysql-.*' || true
- sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri || true
- sudo apt-get remove -y google-cloud-sdk google-cloud-cli || true
- sudo apt-get autoremove -y
- sudo apt-get clean
-
- # Remove Docker images
- sudo docker image prune --force
-
- # Remove swap storage
- sudo swapoff -a || true
- sudo rm -f /mnt/swapfile || true
-
- echo "Disk space after cleanup:"
- df -h
-
- name: Get inputs and secrets
id: inputs-and-secrets
shell: python
diff --git a/docker-compose.yml b/docker-compose.yml
index 01ea58b8c..367fbb5fa 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -36,7 +36,7 @@ services:
postgresql:
restart: always
- image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
+ image: openremote/postgresql:${POSTGRESQL_VERSION:-latest-slim}
shm_size: 128mb
volumes:
- postgresql-data:/var/lib/postgresql/data
diff --git a/profile/demo.yml b/profile/demo.yml
index 0bfca6f91..3bfaebf80 100644
--- a/profile/demo.yml
+++ b/profile/demo.yml
@@ -57,7 +57,7 @@ services:
postgresql:
restart: always
- image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
+ image: openremote/postgresql:${POSTGRESQL_VERSION:-latest-slim}
shm_size: 128mb
volumes:
- postgresql-data:/var/lib/postgresql/data
diff --git a/profile/deploy.yml b/profile/deploy.yml
index 6385fe8e1..189f7be78 100644
--- a/profile/deploy.yml
+++ b/profile/deploy.yml
@@ -433,7 +433,7 @@ services:
# PostgreSQL DBMS
postgresql:
- image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
+ image: openremote/postgresql:${POSTGRESQL_VERSION:-latest-slim}
restart: always
# Shared memory should be increased for any reasonable DB size this should be increased further
shm_size: 128mb
diff --git a/test/load1/deployment1/test-load1.yml b/test/load1/deployment1/test-load1.yml
index 25dbe294d..99b2630ed 100644
--- a/test/load1/deployment1/test-load1.yml
+++ b/test/load1/deployment1/test-load1.yml
@@ -42,7 +42,7 @@ services:
postgresql:
restart: always
- image: openremote/postgresql:${POSTGRESQL_VERSION:-latest}
+ image: openremote/postgresql:${POSTGRESQL_VERSION:-latest-slim}
shm_size: 128mb
environment:
POSTGRES_MAX_CONNECTIONS: ${POSTGRES_MAX_CONNECTIONS:-100}