This commit is contained in:
LUXEY Adrien 2021-05-14 10:32:40 +02:00
parent 560e1f1d90
commit 7275c5b156
3 changed files with 17 additions and 1 deletions

View file

@ -17,8 +17,11 @@
Solution: each new service needs to add its nginx configuration to `app/nginx/config`. Solution: each new service needs to add its nginx configuration to `app/nginx/config`.
* The services URL should be accessible from Consul using tags, instead of being hard-coded in configuration files.
* The dummy HTTP server replicas must not be accessible through the Internet.
* TLS: Let's Encrypt will probably be part of the same job definition as nginx. * TLS: Let's Encrypt will probably be part of the same job definition as nginx.
2. Gitea migration 2. Gitea migration
* Postgres database: needs to be its own Nomad job. * Postgres database: needs to be its own Nomad job.

View file

@ -16,6 +16,9 @@ job "dummy-http-server" {
interval = "2s" interval = "2s"
timeout = "2s" timeout = "2s"
} }
tags = [
"url=dummy.hammerhead.luxeylab.net"
]
} }
task "server" { task "server" {

View file

@ -8,8 +8,17 @@ job "nginx" {
port "http" { port "http" {
static = 80 static = 80
} }
port "https" {
static = 443
}
} }
# volume "certs" {
# type = "host"
# source = "ca-certificates"
# # read_only = true
# }
service { service {
name = "nginx" name = "nginx"
port = "http" port = "http"
@ -19,10 +28,11 @@ job "nginx" {
driver = "docker" driver = "docker"
config { config {
ports = ["http"] ports = ["http", "https"]
image = "nginx" image = "nginx"
volumes = [ volumes = [
"local:/etc/nginx/conf.d", "local:/etc/nginx/conf.d",
#"certs:..."
] ]
} }