Migrate Nextcloud to Nomad 1.0.1

This commit is contained in:
Quentin 2020-12-22 10:46:26 +01:00
parent b6ccf06d8a
commit 846449b238
2 changed files with 11 additions and 14 deletions

View file

@ -55,7 +55,7 @@ git submodule update
Deploy Nomad on your machine: Deploy Nomad on your machine:
```bash ```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 wget https://releases.hashicorp.com/nomad/${NOMAD_VER}/nomad_${NOMAD_VER}_linux_amd64.zip
unzip nomad_${NOMAD_VER}_linux_amd64.zip unzip nomad_${NOMAD_VER}_linux_amd64.zip
sudo mv nomad /usr/local/bin sudo mv nomad /usr/local/bin
@ -65,7 +65,7 @@ rm nomad_${NOMAD_VER}_linux_amd64.zip
Deploy Consul on your machine: Deploy Consul on your machine:
```bash ```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 wget https://releases.hashicorp.com/consul/${CONSUL_VER}/consul_${CONSUL_VER}_linux_amd64.zip
unzip consul_${CONSUL_VER}_linux_amd64.zip unzip consul_${CONSUL_VER}_linux_amd64.zip
sudo mv consul /usr/local/bin sudo mv consul /usr/local/bin

View file

@ -10,34 +10,31 @@ job "nextcloud" {
group "nextcloud" { group "nextcloud" {
count = 1 count = 1
network {
port "web_port" {
to = 80
}
}
task "nextcloud" { task "nextcloud" {
driver = "docker" driver = "docker"
config { config {
image = "lxpz/deuxfleurs_nextcloud_amd64:8" image = "lxpz/deuxfleurs_nextcloud_amd64:8"
port_map { ports = [ "web_port" ]
web_port = 80
}
volumes = [ volumes = [
"secrets/config.php:/var/www/html/config/config.php" "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 { template {
source = "secrets/config.php.tpl" data = file("../config/configuration/nextcloud/config.php.tpl")
destination = "secrets/config.php" destination = "secrets/config.php"
} }
resources { resources {
memory = 1000 memory = 1000
cpu = 2000 cpu = 2000
network {
port "web_port" {}
}
} }
service { service {