Added health etc

This commit is contained in:
Maurice
2025-07-23 18:21:13 +02:00
parent da47934db9
commit 401ab5f016
3 changed files with 91 additions and 6 deletions

View File

@@ -5,6 +5,16 @@ name = "nc-test-api"
image = "numberchords-api"
network = "nc-network"
depend = ["nc-test-database"]
restart = "unless-stopped"
detach = true
hostname = "nc-test-api-hn"
[service.healthcheck]
cmd = "pg_isready --dbname=$DB_DATABASE_NAME --username=$DB_USERNAME || exit 1"
interval = "5s"
start_period = "30s"
retries = 3
on_failure = "none"
[environment]
ASPNETCORE_ENVIRONMENT = "Test"
@@ -28,4 +38,10 @@ container = 2222
[[volumes]]
volume = "test"
path = "/data/test"
path = "/data/test"
[[mounts]]
typ = "bind"
source = "/etc/hosts"
target = "/etc/hosts"
read_only = true