83 lines
1.9 KiB
HCL
83 lines
1.9 KiB
HCL
job "wallabag" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "wallabag" {
|
|
count = 1
|
|
|
|
task "wallabag" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "wallabag/wallabag:latest"
|
|
ports = ["http"]
|
|
memory_hard_limit = 2048
|
|
|
|
#health_check {
|
|
# test = ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
# interval = "10s"
|
|
# timeout = "5s"
|
|
#}
|
|
}
|
|
|
|
env {
|
|
POSTGRES_PASSWORD="postgres"
|
|
POSTGRES_USER="postgres"
|
|
SYMFONY__ENV__DATABASE_DRIVER="pdo_pgsql"
|
|
SYMFONY__ENV__DATABASE_HOST="master.postgres.service.dc1.consul"
|
|
SYMFONY__ENV__DATABASE_NAME="wallabag"
|
|
SYMFONY__ENV__DATABASE_USER="wallabag"
|
|
SYMFONY__ENV__DATABASE_PASSWORD="wallabag"
|
|
SYMFONY__ENV__DOMAIN_NAME="https://wallabag.fbleagh.duckdns.org"
|
|
SYMFONY__ENV__DATABASE_PORT="5432"
|
|
POPULATE_DATABASE="False"
|
|
SYMFONY__ENV__MAILER_DSN= "gmail+smtp://stuart.stent@gmail.com:lsrhrzfembksmvgc@default"
|
|
SYMFONY__ENV__FROM_EMAIL="wallabag@wallabag.fbleagh.duckdns.org"
|
|
|
|
|
|
|
|
}
|
|
|
|
service {
|
|
name = "${TASKGROUP}"
|
|
tags = ["wallabag", "tools",
|
|
"traefik.http.routers.wallabaglan.rule=Host(`wallabag.service.dc1.consul`)",
|
|
"traefik.http.routers.wallabagwan.rule=Host(`wallabag.fbleagh.duckdns.org`)",
|
|
"traefik.http.routers.wallabagwan.tls=true",
|
|
]
|
|
port = "http"
|
|
|
|
#check {
|
|
# type = "script"
|
|
# name = "check_up"
|
|
# command = "/local/healthcheck.sh"
|
|
# interval = "60s"
|
|
# timeout = "5s"
|
|
|
|
# check_restart {
|
|
# limit = 3
|
|
# grace = "90s"
|
|
# ignore_warnings = false
|
|
# }
|
|
#}
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
}
|
|
|
|
}
|
|
network {
|
|
// mbits = 100
|
|
|
|
port "http" {
|
|
to = 80
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|