~damien/infrastructure

9de1d989c59560666b19033082a90233378e1860 — Damien Radtke 8 months ago 0891707
Small cleanup
1 files changed, 1 insertions(+), 13 deletions(-)

M jobs/fabio.nomad.erb
M jobs/fabio.nomad.erb => jobs/fabio.nomad.erb +1 -13
@@ 2,20 2,8 @@
  @fabio_version  = "1.5.13"
  @golang_version = "1.13.4"
  @fabio_checksum = "sha256:716aaa264e2ffb7a98a574220e0e20d7d40e2f1b2717584d6f260e01f89220fc"

  @photos_radtke_family_url = "https://radtke-family.synology.me:4430/photo/"
%>

// TODO: The porter program shouldn't be necessary to have, and redirecting http://photos.radtke.family
// to an HTTPS address results in two "untrusted certificate" warnings (one for redirecting to HTTPS,
// the second for redirecting to the final destination). Unfortunately, Fabio doesn't seem to support
// redirecting HTTP to HTTPS natively. https://github.com/fabiolb/fabio/issues/87
//
// The best solution will probably be to have two Fabio instances running: one for HTTP requests,
// the other for HTTPS. damienradtke.com would forward HTTP requests to the HTTPS Fabio, which would
// terminate SSL and then serve the request. photos.radtke.family would forward HTTP requests directly
// to the final address.

job "fabio" {
	region = "global"
	datacenters = ["ca-central"]


@@ 82,7 70,7 @@ job "fabio" {
				command = "porter",
				args = [
					"-to", "localhost:${NOMAD_PORT_fabio_balancer}",
					"-http-redirect", "photos.radtke.family=<%= @photos_radtke_family_url %>",
					"-http-redirect", "photos.radtke.family=https://radtke-family.synology.me:4430/photo/",
				]
			}