From bf99aecc68a7d19c4f09a20e26446a1656046778 Mon Sep 17 00:00:00 2001 From: Lancelot Date: Mon, 23 Dec 2024 18:13:55 +0100 Subject: [PATCH] Add dynamic compose for halo (#6095) --- apps/halo/config.json | 5 +-- apps/halo/docker-compose.json | 57 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 apps/halo/docker-compose.json diff --git a/apps/halo/config.json b/apps/halo/config.json index b8f6f07fb3..7031a03fe3 100644 --- a/apps/halo/config.json +++ b/apps/halo/config.json @@ -3,9 +3,10 @@ "name": "Halo", "available": true, "exposable": true, + "dynamic_config": true, "port": 8092, "id": "halo", - "tipi_version": 39, + "tipi_version": 40, "version": "2.20.12", "description": "Halo is a powerful and easy-to-use open source website building tool.", "short_desc": "Halo - Open source website building tool.", @@ -28,5 +29,5 @@ ], "supported_architectures": ["arm64", "amd64"], "created_at": 1691943801422, - "updated_at": 1734430834000 + "updated_at": 1734908291311 } diff --git a/apps/halo/docker-compose.json b/apps/halo/docker-compose.json new file mode 100644 index 0000000000..6b357462cd --- /dev/null +++ b/apps/halo/docker-compose.json @@ -0,0 +1,57 @@ +{ + "services": [ + { + "name": "halo", + "image": "halohub/halo:2.20.12", + "isMain": true, + "internalPort": 8090, + "dependsOn": { + "halodb": { + "condition": "service_healthy" + } + }, + "volumes": [ + { + "hostPath": "${APP_DATA_DIR}", + "containerPath": "/root/.halo2" + } + ], + "command": [ + "--spring.r2dbc.url=r2dbc:pool:postgresql://halodb/halo", + "--spring.r2dbc.username=halo", + "--spring.r2dbc.password=${HALO_DATABASE_PASSWORD}", + "--spring.sql.init.platform=postgresql", + "--halo.external-url=${HALO_EXTERNAL_URL}" + ], + "healthCheck": { + "interval": "30s", + "timeout": "5s", + "retries": 5, + "startPeriod": "30s", + "test": "curl -f http://localhost:8090/actuator/health/readiness" + } + }, + { + "name": "halodb", + "image": "postgres:latest", + "environment": { + "POSTGRES_PASSWORD": "${HALO_DATABASE_PASSWORD}", + "POSTGRES_USER": "halo", + "POSTGRES_DB": "halo", + "PGUSER": "halo" + }, + "volumes": [ + { + "hostPath": "${APP_DATA_DIR}/db", + "containerPath": "/var/lib/postgresql/data" + } + ], + "healthCheck": { + "interval": "10s", + "timeout": "5s", + "retries": 5, + "test": "pg_isready" + } + } + ] +}