Skip to content

Commit 3391078

Browse files
committed
feat: added getting of configuration from listmonk.env
1 parent 6ed88a0 commit 3391078

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

imageroot/actions/get-configuration/20read

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ import agent
1616

1717
# Prepare return variable
1818
config = {}
19+
if os.path.exists("listmonk.env"):
20+
config["ADMIN_USERNAME"] = agent.read_envfile("listmonk.env")["ADMIN_USERNAME"]
21+
config["ADMIN_PASSWORD"] = agent.read_envfile("listmonk.env")["ADMIN_PASSWORD"]
22+
else:
23+
config["ADMIN_USERNAME"] = ""
24+
config["ADMIN_PASSWORD"] = ""
1925

2026
# Read current configuration from the environment file
2127
config["host"] = os.getenv("TRAEFIK_HOST","")

ui/src/views/Settings.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ export default {
229229
this.host = config.host;
230230
this.isLetsEncryptEnabled = config.lets_encrypt;
231231
this.isHttpToHttpsEnabled = config.http2https;
232+
this.ADMIN_USERNAME = config.ADMIN_USERNAME;
233+
this.ADMIN_PASSWORD = config.ADMIN_PASSWORD;
232234
233235
this.loading.getConfiguration = false;
234236
this.focusElement("host");

0 commit comments

Comments
 (0)