107 lines
2.2 KiB
HCL
107 lines
2.2 KiB
HCL
job "nextcloud" {
|
|
region = "global"
|
|
datacenters = ["dc1"]
|
|
type = "service"
|
|
|
|
group "nextcloud" {
|
|
|
|
network {
|
|
port "http" {
|
|
to = 80
|
|
}
|
|
|
|
port "onlyoffice-http" {
|
|
to = 8000
|
|
}
|
|
}
|
|
|
|
volume "nextcloud-html" {
|
|
type = "host"
|
|
source = "nextcloud-html"
|
|
read_only = false
|
|
}
|
|
|
|
volume "onlyoffice-data" {
|
|
type = "host"
|
|
source = "onlyoffice-data"
|
|
read_only = false
|
|
}
|
|
|
|
task "nextcloud" {
|
|
driver = "docker"
|
|
|
|
env {
|
|
NEXTCLOUD_ADMIN_USER = "CHANGE ME"
|
|
NEXTCLOUD_ADMIN_PASSWORD = "CHANGE ME"
|
|
NEXTCLOUD_TRUSTED_DOMAINS = "nextcloud.arsenm.dev"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "nextcloud-html"
|
|
destination = "/var/www/html"
|
|
read_only = false
|
|
}
|
|
|
|
config {
|
|
image = "nextcloud"
|
|
ports = ["http"]
|
|
}
|
|
|
|
service {
|
|
name = "nextcloud"
|
|
port = "http"
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.nextcloud.rule=Host(`nextcloud.arsenm.dev`)",
|
|
"traefik.http.routers.nextcloud.tls.certresolver=letsencrypt"
|
|
]
|
|
|
|
check {
|
|
type = "tcp"
|
|
port = "http"
|
|
interval = "30s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 512
|
|
}
|
|
}
|
|
|
|
task "onlyoffice" {
|
|
driver = "docker"
|
|
|
|
volume_mount {
|
|
volume = "onlyoffice-data"
|
|
destination = "/var/www/onlyoffice/Data"
|
|
read_only = false
|
|
}
|
|
|
|
config {
|
|
image = "onlyoffice/documentserver:latest"
|
|
ports = ["onlyoffice-http"]
|
|
}
|
|
|
|
|
|
service {
|
|
name = "onlyoffice"
|
|
port = "onlyoffice-http"
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.arsenm.dev`)",
|
|
"traefik.http.routers.onlyoffice.tls.certresolver=letsencrypt",
|
|
"traefik.http.routers.onlyoffice.middlewares=onlyoffice-headers",
|
|
"traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
|
|
]
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 1536
|
|
}
|
|
}
|
|
}
|
|
}
|