Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 36b32f0e88 | |||
| 8a556c25a0 | |||
| f271602f31 | |||
| 63319e1046 |
@@ -234,22 +234,24 @@ jobs:
|
|||||||
|
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v "${DEPLOY_PATH}:/workspace/nexus" \
|
-v "${DEPLOY_PATH}:/workspace/nexus" \
|
||||||
-v "/tmp:/tmp-host:ro" \
|
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-w /workspace/nexus \
|
-w /workspace/nexus \
|
||||||
|
-i \
|
||||||
docker:cli \
|
docker:cli \
|
||||||
sh -c "
|
sh -c "
|
||||||
set -e
|
set -e
|
||||||
|
trap 'rm -f /tmp/nexus-deploy-env' EXIT
|
||||||
|
cat > /tmp/nexus-deploy-env
|
||||||
if [ -n '${SERVICE_ARG}' ]; then
|
if [ -n '${SERVICE_ARG}' ]; then
|
||||||
echo '🚀 Deploying service: ${SERVICE_ARG}'
|
echo '🚀 Deploying service: ${SERVICE_ARG}'
|
||||||
docker compose --env-file /tmp-host/$(basename "${ENV_TMPFILE}") build ${BUILD_ARGS} ${SERVICE_ARG}
|
docker compose --env-file /tmp/nexus-deploy-env build ${BUILD_ARGS} ${SERVICE_ARG}
|
||||||
docker compose --env-file /tmp-host/$(basename "${ENV_TMPFILE}") up -d --wait --force-recreate ${SERVICE_ARG}
|
docker compose --env-file /tmp/nexus-deploy-env up -d --wait --force-recreate ${SERVICE_ARG}
|
||||||
else
|
else
|
||||||
echo '🚀 Deploying all services'
|
echo '🚀 Deploying all services'
|
||||||
docker compose --env-file /tmp-host/$(basename "${ENV_TMPFILE}") build ${BUILD_ARGS}
|
docker compose --env-file /tmp/nexus-deploy-env build ${BUILD_ARGS}
|
||||||
docker compose --env-file /tmp-host/$(basename "${ENV_TMPFILE}") up -d --wait --force-recreate
|
docker compose --env-file /tmp/nexus-deploy-env up -d --wait --force-recreate
|
||||||
fi
|
fi
|
||||||
"
|
" < "${ENV_TMPFILE}"
|
||||||
|
|
||||||
echo "✅ Docker compose up completed"
|
echo "✅ Docker compose up completed"
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,12 @@ namespace Nexus.Api.Controllers;
|
|||||||
[ApiController]
|
[ApiController]
|
||||||
public class HealthController(IAgentRuntime runtime, HealthCheckService healthChecks) : ControllerBase
|
public class HealthController(IAgentRuntime runtime, HealthCheckService healthChecks) : ControllerBase
|
||||||
{
|
{
|
||||||
|
[HttpGet("/health/live")]
|
||||||
|
public IResult Live()
|
||||||
|
{
|
||||||
|
return Results.Ok(new { status = "Healthy", timestamp = DateTimeOffset.UtcNow });
|
||||||
|
}
|
||||||
|
|
||||||
[HttpGet("/health")]
|
[HttpGet("/health")]
|
||||||
public async Task<IResult> Get(CancellationToken ct)
|
public async Task<IResult> Get(CancellationToken ct)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1"]
|
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:8080/health/live || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user