Skip to content

Commit d5004cd

Browse files
author
charlesgauthereau
committed
fix: agent.py
1 parent 9a1d157 commit d5004cd

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

commands/agent.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
from core.config import write_file, write_env_file, add_db_to_json
1111
from core.docker import ensure_network, run_compose
1212
from core.network import fetch_template
13-
from templates.compose import AGENT_POSTGRES_SNIPPET, AGENT_MARIADB_SNIPPET
13+
from templates.compose import AGENT_POSTGRES_SNIPPET, AGENT_MARIADB_SNIPPET, AGENT_MONGODB_AUTH_SNIPPET, \
14+
AGENT_MONGODB_SNIPPET
1415

1516

1617
def agent(
@@ -57,7 +58,7 @@ def agent(
5758
console.print(Panel("[bold]Database Setup[/bold]", style="cyan"))
5859

5960
while Confirm.ask("Do you want to configure a database?", default=True):
60-
mode = Prompt.ask("Configuration Mode", choices=["new", "existing"], default="news")
61+
mode = Prompt.ask("Configuration Mode", choices=["new", "existing"], default="new")
6162

6263
if mode == "existing":
6364
console.print("[info]External/Existing Database Configuration[/info]")
@@ -170,7 +171,7 @@ def agent(
170171
env_vars[f"{var_prefix}_USER"] = db_user
171172
env_vars[f"{var_prefix}_PASS"] = db_pass
172173

173-
snippet = AGENT_MARIADB_SNIPPET \
174+
snippet = AGENT_MONGODB_AUTH_SNIPPET \
174175
.replace("${SERVICE_NAME}", service_name) \
175176
.replace("${PORT}", f"${{{var_prefix}_PORT}}") \
176177
.replace("${VOL_NAME}", f"{service_name}-data") \
@@ -203,7 +204,7 @@ def agent(
203204
env_vars[f"{var_prefix}_PORT"] = str(mongo_port)
204205
env_vars[f"{var_prefix}_DB"] = db_name
205206

206-
snippet = AGENT_MARIADB_SNIPPET \
207+
snippet = AGENT_MONGODB_SNIPPET \
207208
.replace("${SERVICE_NAME}", service_name) \
208209
.replace("${PORT}", f"${{{var_prefix}_PORT}}") \
209210
.replace("${VOL_NAME}", f"{service_name}-data") \

0 commit comments

Comments
 (0)