askap-vast / vast-pipeline

This repository holds the code of the Radio Transient detection pipeline for the VAST project.
https://vast-survey.org/vast-pipeline/
MIT License
8 stars 3 forks source link

gulpfile depends on .env #547

Closed marxide closed 3 years ago

marxide commented 3 years ago

I'm currently working on containerizing the pipeline for the new version. With this setup, it's desirable to pass in the required pipeline config vars straight into the container environment at runtime rather than writing them out to webinterface/.env and baking secrets into the image.

To address this, we should remove any dependencies on webinterface/.env outside of the webinterface/settings.py file – and even there it's not strictly a requirement as environ.Env.read_env() will load the vars from webinterface/.env into the environment if it exists and fail with only a warning if it doesn't. i.e. if the required pipeline config vars are already in the environment, then it shouldn't matter if webinterface/.env exists or not.

I only found one reference that needs to be taken care of: gulp loads the webinterface/.env file to get BASE_URL and STATIC_URL in order to fix some JS9 paths for production environments.