commit 4955730ac57f033a8c313fcd8b3fd861cd4729a2
parent 5b2a6d0e560dcf5a7eca3b3d37ca3504170c954f
Author: Andreas Gruhler <agruhl@gmx.ch>
Date: Sun, 16 Mar 2025 21:15:28 +0100
fix(meta): config db connection
Diffstat:
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/docker/docker-todo/Dockerfile b/docker/docker-todo/Dockerfile
@@ -8,8 +8,8 @@ ARG TODO_VERSION="0.77.4"
ENV TODO_VERSION="$TODO_VERSION"
# Set user and group
-ARG user=meta
-ARG group=meta
+ARG user=todo
+ARG group=todo
ARG uid=1000
ARG gid=1000
@@ -24,10 +24,13 @@ RUN apk update && apk add --no-cache git make go sassc minify
# libpq-dev:
# https://www.psycopg.org/docs/install.html#build-prerequisites
#
+# The uwsgi python3 plugin is required to run the web app
+# https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html#installing-uwsgi-with-python-support
+#
# Tinycss was a missing preprequisite in the core package:
# https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds/tree/master/item/sr.ht/core.sr.ht/APKBUILD
RUN apk add --no-cache py3-tinycss2 \
- libpq-dev py3-psycopg2 python3 py3-pip uwsgi
+ libpq-dev py3-psycopg2 python3 py3-pip uwsgi-python3
# Install core shared assets
RUN git clone --recurse-submodules https://git.sr.ht/~sircmpwn/core.sr.ht core \
diff --git a/hcl/default/meta/templates/config.ini.tmpl b/hcl/default/meta/templates/config.ini.tmpl
@@ -87,12 +87,12 @@ smtp-encryption=starttls
# Options: plain, none
smtp-auth=plain
# user / password are required if smtp-auth is plain
-smtp-user=
-smtp-password=
+smtp-user={{with secret "kv/meta"}}{{index .Data.data.smtp_user}}{{end}}
+smtp-password={{with secret "kv/meta"}}{{index .Data.data.smtp_password}}{{end}}
#
# Application exceptions are emailed to this address
-error-to={{with secret "kv/meta"}}{{index .Data.data.smtp_user}}{{end}}
-error-from={{with secret "kv/meta"}}{{index .Data.data.smtp_password}}{{end}}
+error-to=contact@p0c.ch
+error-from=contact@p0c.ch
#
# You should generate a PGP key to allow users to authenticate emails received
# from your services. Use `gpg --edit-key [key id]` to remove the password from
@@ -124,7 +124,7 @@ origin=https://meta.p0c.ch
#debug-port={{ env "NOMAD_PORT_web" }}
#
# Configures the SQLAlchemy connection string for the database.
-connection-string=postgresql://meta:{{with secret "kv/meta"}}{{index .Data.data.postgresql_password}}{{end}}:@turris/meta
+connection-string=postgresql://meta:{{with secret "kv/meta"}}{{index .Data.data.postgresql_password}}{{end}}@postgres.lan/meta
#
# Set to "yes" to automatically run migrations on package upgrade.
migrate-on-upgrade=yes