From 15c05029129afdc2a3f7e6b2c36e93d297b3de73 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Fri, 3 Jan 2025 02:06:49 -0800 Subject: fix ssl --- roles/phoneof/tasks/main.yml | 7 +++++++ roles/phoneof/templates/docker-compose.yml.j2 | 2 ++ template/api/template/template.go | 2 +- template/static/css/styles.css | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/phoneof/tasks/main.yml b/roles/phoneof/tasks/main.yml index 1ae43b8..dcd4720 100644 --- a/roles/phoneof/tasks/main.yml +++ b/roles/phoneof/tasks/main.yml @@ -1,4 +1,11 @@ --- +- name: Download internal cert + ansible.builtin.get_url: + url: https://ca.internal.simponic.xyz/roots.pem + validate_certs: false + dest: /etc/roots.pem + checksum: sha256:12a1d52af6f4073c339946e8c67bdd48fa85590480385fcce7f16b6b60d40831 + - name: ensure phoneof docker/compose exist file: path: /etc/docker/compose/phoneof diff --git a/roles/phoneof/templates/docker-compose.yml.j2 b/roles/phoneof/templates/docker-compose.yml.j2 index 3acf768..58551ae 100644 --- a/roles/phoneof/templates/docker-compose.yml.j2 +++ b/roles/phoneof/templates/docker-compose.yml.j2 @@ -14,8 +14,10 @@ services: - TO_PHONE_NUMBER={{ to_phone_number }} - HTTPSMS_API_TOKEN={{ httpsms_api_token }} - HTTPSMS_SIGNING_KEY={{ httpsms_signing_key }} + - SSL_CERT_DIR=/etc/ssl/ volumes: - ./db:/app/db + - /etc/roots.pem:/etc/ssl/roots.pem dns: - {{ nameserver_ip }} ports: diff --git a/template/api/template/template.go b/template/api/template/template.go index 9190f29..a5db3d6 100644 --- a/template/api/template/template.go +++ b/template/api/template/template.go @@ -43,7 +43,7 @@ func renderTemplate(context *types.RequestContext, templateName string, showBase func TemplateContinuation(path string, showBase bool) types.Continuation { return func(context *types.RequestContext, req *http.Request, resp http.ResponseWriter) types.ContinuationChain { return func(success types.Continuation, failure types.Continuation) types.ContinuationChain { - html, err := renderTemplate(context, path, true) + html, err := renderTemplate(context, path, showBase) if errors.Is(err, os.ErrNotExist) { resp.WriteHeader(404) html, err = renderTemplate(context, "404.html", true) diff --git a/template/static/css/styles.css b/template/static/css/styles.css index 42acdac..2ec823a 100644 --- a/template/static/css/styles.css +++ b/template/static/css/styles.css @@ -1,6 +1,7 @@ @import "/static/css/colors.css"; @import "/static/css/form.css"; @import "/static/css/table.css"; +@import "/static/css/chat.css"; @font-face { font-family: 'GeistMono'; -- cgit v1.2.3-70-g09d2