refactor(matrix): remove unused port configurations and inline nginx.conf
This commit is contained in:
parent
0862fe1029
commit
6cad5c77f7
1 changed files with 52 additions and 15 deletions
|
@ -56,8 +56,6 @@ job "matrix" {
|
||||||
config {
|
config {
|
||||||
image = "ghcr.io/element-hq/synapse:v1.122.0"
|
image = "ghcr.io/element-hq/synapse:v1.122.0"
|
||||||
|
|
||||||
ports = ["8008"]
|
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/docker/matrix/synapse:/data",
|
"/mnt/docker/matrix/synapse:/data",
|
||||||
"/mnt/docker/matrix/media_store:/media_store",
|
"/mnt/docker/matrix/media_store:/media_store",
|
||||||
|
@ -146,8 +144,6 @@ job "matrix" {
|
||||||
config {
|
config {
|
||||||
image = "dock.mau.dev/mautrix/whatsapp:v0.11.2"
|
image = "dock.mau.dev/mautrix/whatsapp:v0.11.2"
|
||||||
|
|
||||||
ports = ["8082"]
|
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/docker/matrix/whatsapp-data:/data"
|
"/mnt/docker/matrix/whatsapp-data:/data"
|
||||||
]
|
]
|
||||||
|
@ -209,8 +205,6 @@ job "matrix" {
|
||||||
image = "ghcr.io/matrix-org/matrix-authentication-service:main"
|
image = "ghcr.io/matrix-org/matrix-authentication-service:main"
|
||||||
force_pull = true
|
force_pull = true
|
||||||
|
|
||||||
ports = ["8081"]
|
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/docker/matrix/synapse-mas/config.yaml:/config.yaml:ro"
|
"/mnt/docker/matrix/synapse-mas/config.yaml:/config.yaml:ro"
|
||||||
]
|
]
|
||||||
|
@ -236,9 +230,7 @@ job "matrix" {
|
||||||
|
|
||||||
network {
|
network {
|
||||||
mode = "bridge"
|
mode = "bridge"
|
||||||
port "nginx" {
|
port "http" {}
|
||||||
to = 80
|
|
||||||
}
|
|
||||||
port "envoy_metrics" {
|
port "envoy_metrics" {
|
||||||
to = 9102
|
to = 9102
|
||||||
}
|
}
|
||||||
|
@ -246,7 +238,7 @@ job "matrix" {
|
||||||
|
|
||||||
service {
|
service {
|
||||||
provider = "consul"
|
provider = "consul"
|
||||||
port = "80"
|
port = "http"
|
||||||
|
|
||||||
meta {
|
meta {
|
||||||
envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}"
|
envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}"
|
||||||
|
@ -279,16 +271,61 @@ job "matrix" {
|
||||||
config {
|
config {
|
||||||
image = "docker.io/library/nginx:1.27.3-alpine"
|
image = "docker.io/library/nginx:1.27.3-alpine"
|
||||||
|
|
||||||
ports = ["80"]
|
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/docker/matrix/nginx/templates:/etc/nginx/templates:ro",
|
|
||||||
"/mnt/docker/matrix/nginx/html:/usr/share/nginx/html:ro",
|
"/mnt/docker/matrix/nginx/html:/usr/share/nginx/html:ro",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
mount {
|
||||||
|
type = "bind"
|
||||||
|
source = "local/nginx.conf"
|
||||||
|
target = "/etc/nginx/nginx.conf"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
env = {
|
template {
|
||||||
NGINX_PORT = "80"
|
data = <<-EOF
|
||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
|
||||||
|
error_log stderr;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
access_log off;
|
||||||
|
http2 on;
|
||||||
|
proxy_buffering off;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen {{ env "NOMAD_PORT_http" }};
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /health {
|
||||||
|
return 200 "OK";
|
||||||
|
default_type text/plain;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /.well-known/matrix {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
destination = "local/nginx.conf"
|
||||||
|
change_mode = "signal"
|
||||||
|
change_signal = "SIGHUP"
|
||||||
}
|
}
|
||||||
|
|
||||||
resources {
|
resources {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue