Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses a dedicated setting to generate the magma VITE_CALDERA_URL variable #2994

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ app.contact.ftp.user: caldera_user
app.contact.tcp: 0.0.0.0:7010
app.contact.udp: 0.0.0.0:7011
app.contact.websocket: 0.0.0.0:7012
app.frontend.api_base_url: http://localhost:8888
objects.planners.default: atomic
crypt_salt: REPLACE_WITH_RANDOM_VALUE
encryption_key: ADMIN123
Expand Down
5 changes: 2 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,9 @@ async def start_vue_dev_server():

def configure_magma_env_file():
logging.info("Setting VueJS environment file.")
host = BaseWorld.get_config("host")
port = BaseWorld.get_config("port")
url = BaseWorld.get_config("app.frontend.api_base_url")
with open(f"{MAGMA_PATH}/.env", "w") as fp:
fp.write(f"VITE_CALDERA_URL=http://{host}:{port}")
fp.write(f"VITE_CALDERA_URL={url}")


def _get_parser():
Expand Down
Loading