aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2020-12-22 10:46:26 +0100
committerQuentin <quentin@deuxfleurs.fr>2020-12-22 10:46:26 +0100
commit846449b2383d8ff3041be2d035017047090dcaef (patch)
tree74b742e94dce118c23d4d095a826e426ff8b48db
parentb6ccf06d8ab9f257725e9a5596f99425c1b48ee5 (diff)
downloadinfrastructure-846449b2383d8ff3041be2d035017047090dcaef.tar.gz
infrastructure-846449b2383d8ff3041be2d035017047090dcaef.zip
Migrate Nextcloud to Nomad 1.0.1
-rw-r--r--README.md4
-rw-r--r--app/deployment/nextcloud.hcl21
2 files changed, 11 insertions, 14 deletions
diff --git a/README.md b/README.md
index 469a4d1..35e1d43 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,7 @@ git submodule update
Deploy Nomad on your machine:
```bash
-export NOMAD_VER=0.9.1
+export NOMAD_VER=1.0.1
wget https://releases.hashicorp.com/nomad/${NOMAD_VER}/nomad_${NOMAD_VER}_linux_amd64.zip
unzip nomad_${NOMAD_VER}_linux_amd64.zip
sudo mv nomad /usr/local/bin
@@ -65,7 +65,7 @@ rm nomad_${NOMAD_VER}_linux_amd64.zip
Deploy Consul on your machine:
```bash
-export CONSUL_VER=1.5.1
+export CONSUL_VER=1.9.0
wget https://releases.hashicorp.com/consul/${CONSUL_VER}/consul_${CONSUL_VER}_linux_amd64.zip
unzip consul_${CONSUL_VER}_linux_amd64.zip
sudo mv consul /usr/local/bin
diff --git a/app/deployment/nextcloud.hcl b/app/deployment/nextcloud.hcl
index b2e11bf..8eed7d9 100644
--- a/app/deployment/nextcloud.hcl
+++ b/app/deployment/nextcloud.hcl
@@ -10,34 +10,31 @@ job "nextcloud" {
group "nextcloud" {
count = 1
+
+ network {
+ port "web_port" {
+ to = 80
+ }
+ }
+
task "nextcloud" {
driver = "docker"
config {
image = "lxpz/deuxfleurs_nextcloud_amd64:8"
- port_map {
- web_port = 80
- }
+ ports = [ "web_port" ]
volumes = [
"secrets/config.php:/var/www/html/config/config.php"
]
}
- artifact {
- source = "http://127.0.0.1:8500/v1/kv/configuration/nextcloud/config.php.tpl?raw"
- destination = "secrets/config.php.tpl"
- mode = "file"
- }
template {
- source = "secrets/config.php.tpl"
+ data = file("../config/configuration/nextcloud/config.php.tpl")
destination = "secrets/config.php"
}
resources {
memory = 1000
cpu = 2000
- network {
- port "web_port" {}
- }
}
service {