add website
This commit is contained in:
parent
eee3691f96
commit
c27f922d69
@ -13,15 +13,15 @@ job "chainetv" {
|
||||
}
|
||||
}
|
||||
|
||||
task "server" {
|
||||
task "chainetv" {
|
||||
driver = "docker"
|
||||
service {
|
||||
name = "chainetv"
|
||||
port = "http"
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`rss.ducamps.win`)&&PathPrefix(`/chainetv`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=rss.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.win`)&&PathPrefix(`/chainetv`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.middlewares=chainetv,chainetvStrip",
|
||||
"traefik.http.middlewares.chainetv.headers.customrequestheaders.X-Script-Name=/chainetv",
|
||||
|
@ -26,14 +26,14 @@ job "tt-rss" {
|
||||
port = "http"
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`rss.ducamps.win`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=rss.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.win`)&&PathPrefix(`/tt-rss`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
task "app" {
|
||||
task "ttrss-app" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "cthulhoo/ttrss-fpm-pgsql-static"
|
||||
@ -49,7 +49,7 @@ job "tt-rss" {
|
||||
TTRSS_DB_HOST = "db1.ducamps.win"
|
||||
TTRSS_DB_NAME = "ttrss"
|
||||
TTRSS_DB_USER = "ttrss"
|
||||
TTRSS_SELF_URL_PATH = "https://rss.ducamps.win/tt-rss"
|
||||
TTRSS_SELF_URL_PATH = "https://www.ducamps.win/tt-rss"
|
||||
}
|
||||
template {
|
||||
data= <<EOH
|
||||
|
76
www.nomad
Normal file
76
www.nomad
Normal file
@ -0,0 +1,76 @@
|
||||
job "www" {
|
||||
datacenters = ["hetzner"]
|
||||
type = "service"
|
||||
group "www" {
|
||||
network {
|
||||
mode = "host"
|
||||
port "http" {
|
||||
to = 80
|
||||
host_network = "private"
|
||||
}
|
||||
}
|
||||
service {
|
||||
name = "www"
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}_insecure.entrypoints=web",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}_insecure.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)",
|
||||
"traefik.http.routers.${NOMAD_JOB_NAME}_insecure.middlewares=httpsRedirect",
|
||||
"traefik.http.middlewares.httpsRedirect.redirectscheme.scheme=https",
|
||||
]
|
||||
port = "http"
|
||||
}
|
||||
task "server" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "nginx"
|
||||
ports = [
|
||||
"http"
|
||||
]
|
||||
volumes =[
|
||||
"local/nginx.conf:/etc/nginx/nginx.conf",
|
||||
"/srv/http:/usr/share/nginx/html"
|
||||
]
|
||||
|
||||
}
|
||||
template{
|
||||
data= <<EOH
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr warn;
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
error_page 404 /404/404.html;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location / {
|
||||
rewrite ^/.well-known/carddav /radicale/$remote_user/carddav/ redirect;
|
||||
rewrite ^/.well-known/caldav /radicale/$remote_user/caldav/ redirect;
|
||||
index index.html index.htm ;
|
||||
default_type text/html;
|
||||
}
|
||||
location =/ {
|
||||
rewrite ^ /welcome;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
EOH
|
||||
destination="local/nginx.conf"
|
||||
}
|
||||
resources {
|
||||
memory = 50
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user