Skip to content

Commit 9da3a7b

Browse files
committed
feat: added extra vars
1 parent 6aafb08 commit 9da3a7b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

imageroot/actions/configure-module/10configure_environment_vars

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ import agent
1212
# Try to parse the stdin as JSON.
1313
# If parsing fails, output everything to stderr
1414
data = json.load(sys.stdin)
15-
host = data.get('host')
15+
host = data.get("host")
1616
h2hs = data.get("http2https", True)
1717
PROTOCOL = "https" if h2hs else "http"
18-
#This is specific to you module, so you need to change it accordingly.
18+
# This is specific to you module, so you need to change it accordingly.
1919

2020
# EMAIL
2121
rdb = agent.redis_connect(use_replica=True)
2222
smtp_settings = agent.get_smarthost_settings(rdb)
2323

24-
SMTP_HOST = smtp_settings['host']
25-
SMTP_PORT = smtp_settings['port']
26-
SMTP_USER = smtp_settings['username']
27-
SMTP_PASS = smtp_settings['password']
28-
SMTP_ENCRYPTION = smtp_settings['encrypt_smtp']
29-
SMTP_TLSVERIFY= 'true' if smtp_settings['tls_verify'] else 'false'
24+
SMTP_HOST = smtp_settings["host"]
25+
SMTP_PORT = smtp_settings["port"]
26+
SMTP_USER = smtp_settings["username"]
27+
SMTP_PASS = smtp_settings["password"]
28+
SMTP_ENCRYPTION = smtp_settings["encrypt_smtp"]
29+
SMTP_TLSVERIFY = "true" if smtp_settings["tls_verify"] else "false"
3030

3131

3232
password_pusher = {
@@ -42,15 +42,16 @@ password_pusher = {
4242
"PWP__MAIL__SMTP_READ_TIMEOUT": "10",
4343
"PWP__HOST_DOMAIN": host,
4444
"PWP__HOST_PROTOCOL": PROTOCOL,
45-
"PWP__MAIL__MAILER_SENDER": f'Password Pusher <{SMTP_USER}>',
45+
"PWP__MAIL__MAILER_SENDER": f"Password Pusher <{SMTP_USER}>",
4646
"PWP__ENABLE_FILE_PUSHES": "true",
4747
"PWP__FILES__STORAGE": "local",
4848
"PWP__FILES__EXPIRE_AFTER_DAYS_DEFAULT": "2",
4949
"PWP__FILES__EXPIRE_AFTER_DAYS_MAX": "7",
5050
"PWP__FILES__EXPIRE_AFTER_VIEWS_DEFAULT": "5",
5151
"PWP__FILES__EXPIRE_AFTER_VIEWS_MAX": "10",
5252
"PWP__FILES__RETRIEVAL_STEP_DEFAULT": "true",
53-
"PWP__ENABLE_URL_PUSHES": "true"
53+
"PWP__ENABLE_URL_PUSHES": "true",
54+
"PWP__ALLOW_ANONYMOUS": "false",
5455
}
5556
agent.write_envfile("password-pusher.env", password_pusher)
56-
#agent.dump_env()
57+
# agent.dump_env()

imageroot/systemd/user/passwordpusher-app.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ExecStart=/usr/bin/podman run --conmon-pidfile %t/passwordpusher-app.pid \
2323
--pod-id-file %t/passwordpusher.pod-id --replace -d --name passwordpusher-app \
2424
--env-file=%S/state/database-url.env \
2525
--env-file=%S/state/password-pusher.env \
26+
--volume passwordpusher-app:/app:Z \
2627
${PWPUSH_IMAGE}
2728
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/passwordpusher-app.ctr-id -t 10
2829
ExecReload=/usr/bin/podman kill -s HUP passwordpusher-app

0 commit comments

Comments
 (0)