2022-09-09 23:37:09 +00:00
|
|
|
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"
|
2023-07-30 04:32:34 +00:00
|
|
|
NEXTCLOUD_TRUSTED_DOMAINS = "nextcloud.elara.ws"
|
2022-09-09 23:37:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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",
|
2023-07-30 04:32:34 +00:00
|
|
|
"traefik.http.routers.nextcloud.rule=Host(`nextcloud.elara.ws`)",
|
2022-09-09 23:37:09 +00:00
|
|
|
"traefik.http.routers.nextcloud.tls.certresolver=letsencrypt"
|
|
|
|
]
|
|
|
|
|
|
|
|
check {
|
|
|
|
type = "tcp"
|
|
|
|
port = "http"
|
|
|
|
interval = "30s"
|
|
|
|
timeout = "2s"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 512
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-28 01:11:19 +00:00
|
|
|
task "nextcloud-cron" {
|
|
|
|
lifecycle {
|
|
|
|
hook = "poststart"
|
|
|
|
}
|
|
|
|
|
|
|
|
volume_mount {
|
|
|
|
volume = "nextcloud-html"
|
|
|
|
destination = "/var/www/html"
|
|
|
|
read_only = false
|
|
|
|
}
|
|
|
|
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
|
|
|
image = "nextcloud:apache"
|
|
|
|
command = "/cron.sh"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-09 23:37:09 +00:00
|
|
|
task "onlyoffice" {
|
|
|
|
driver = "docker"
|
|
|
|
|
2023-01-28 06:52:20 +00:00
|
|
|
env {
|
|
|
|
JWT_ENABLED = false
|
|
|
|
}
|
|
|
|
|
2022-09-09 23:37:09 +00:00
|
|
|
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",
|
2023-07-30 04:32:34 +00:00
|
|
|
"traefik.http.routers.onlyoffice.rule=Host(`onlyoffice.elara.ws`)",
|
2022-09-09 23:37:09 +00:00
|
|
|
"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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|