summaryrefslogtreecommitdiff
path: root/jobs/keys.nomad.hcl
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2023-08-22 20:52:48 +0200
committerMathias Magnusson <mathias@magnusson.space>2023-08-22 21:52:57 +0200
commit7a239a796cacffdef7d0dfb2a79c3b4485c98358 (patch)
treef5f3df9739736f1502b155c440d685dc91e72008 /jobs/keys.nomad.hcl
parent04b07e354a13aa458d56dc813589e7645877af08 (diff)
downloadgarm-7a239a796cacffdef7d0dfb2a79c3b4485c98358.tar.gz
Add keys page
Diffstat (limited to 'jobs/keys.nomad.hcl')
-rw-r--r--jobs/keys.nomad.hcl62
1 files changed, 62 insertions, 0 deletions
diff --git a/jobs/keys.nomad.hcl b/jobs/keys.nomad.hcl
new file mode 100644
index 0000000..f1b2b04
--- /dev/null
+++ b/jobs/keys.nomad.hcl
@@ -0,0 +1,62 @@
+job "keys" {
+ group "web" {
+ network {
+ port "http" {
+ to = 80
+ }
+ }
+
+ service {
+ name = "keys"
+ port = "http"
+ provider = "nomad"
+
+ tags = [
+ "nginx.hostname=keys.magnusson.space",
+ "nginx.certname=magnusson.space",
+ ]
+ }
+
+ task "web" {
+ driver = "docker"
+
+ resources {
+ cpu = 50
+ memory = 20
+ }
+
+ config {
+ image = "nginx:1.25-alpine"
+ ports = ["http"]
+
+ volumes = [
+ "local/config:/etc/nginx/conf.d",
+ "local/www:/var/www",
+ ]
+ }
+
+ template {
+ data = <<EOF
+server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ http2 on;
+
+ root /var/www;
+ location / {
+ index index.txt;
+ }
+}
+EOF
+ destination = "local/config/website.conf"
+ }
+
+ template {
+ data = <<EOF
+ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEdUe7mxGdV/Q37RKndPzDHisFb7q/xm+L97jcGluSDOA8MGt/+wTxpyGxfyEqaMvwV2bakaMVHTB3711dDu5kE=
+EOF
+ destination = "local/www/index.txt"
+ }
+ }
+ }
+}