1
0
mirror of https://github.com/akpall/akpella.git synced 2026-02-21 08:36:59 +00:00

generate-secrets: added

This commit is contained in:
2026-02-11 05:20:25 +02:00
parent 34b63890fe
commit f5dbd89f11
2 changed files with 14 additions and 0 deletions

View File

@@ -59,3 +59,7 @@ systemd:
- name: docker-matrixdotorg-matrix-appservice-irc.service - name: docker-matrixdotorg-matrix-appservice-irc.service
enabled: false enabled: false
contents_local: docker-matrixdotorg-matrix-appservice-irc.service contents_local: docker-matrixdotorg-matrix-appservice-irc.service
# generate-secrets.service
- name: generate-secrets.service
enabled: true
contents_local: generate-secrets.service

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Create secrets if they don't exist
ConditionPathExists=!/home/core/postgresql/secret
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo "POSTGRES_PASSWORD=$(/usr/bin/openssl rand -base64 20)" > /home/core/postgresql/secret'
[Install]
WantedBy=sysinit.target