Skip to content

Commit

Permalink
Merge pull request #2994 from jbaptperez/fix/magma-env-file
Browse files Browse the repository at this point in the history
Uses a dedicated setting to generate the magma VITE_CALDERA_URL variable
  • Loading branch information
elegantmoose authored Jun 20, 2024
2 parents bababe4 + 0626285 commit d18788a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit d18788a

Please sign in to comment.