From e67953631c2008e9b27cbd23048eca6b3b753ae1 Mon Sep 17 00:00:00 2001 From: Ayden Date: Tue, 1 Oct 2024 14:23:17 +0100 Subject: [PATCH] add nova discord bot task (#61) Co-authored-by: nova <110734810+novanai@users.noreply.github.com> Co-authored-by: wizzdom --- jobs/user-projects/general/nova-timetable.hcl | 55 ++++++++++++++++++- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/jobs/user-projects/general/nova-timetable.hcl b/jobs/user-projects/general/nova-timetable.hcl index f33f2b7..3594e85 100644 --- a/jobs/user-projects/general/nova-timetable.hcl +++ b/jobs/user-projects/general/nova-timetable.hcl @@ -6,10 +6,14 @@ job "nova-timetable" { count = 1 network { - port "db" { + port "redis" { to = 6379 } + port "db" { + to = 5432 + } + port "frontend" { to = 3000 } @@ -52,7 +56,7 @@ job "nova-timetable" { driver = "docker" env { - REDIS_ADDRESS = "${NOMAD_ADDR_db}" + REDIS_ADDRESS = "${NOMAD_ADDR_redis}" } config { @@ -81,12 +85,57 @@ job "nova-timetable" { } } - task "redis-db" { + task "redis" { driver = "docker" config { image = "redis:latest" + ports = ["redis"] + } + } + + task "timetable-db" { + driver = "docker" + + config { + image = "postgres:17.0-alpine" ports = ["db"] + + volumes = [ + "/storage/nomad/nova-timetable/db:/var/lib/postgresql/data" + ] + } + + template { + data = <