mitodl / mit-open

BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Webpack build config loads .env files for running outside of Docker #1221

Closed jonkafton closed 2 days ago

jonkafton commented 3 days ago

Description (What does it do?)

Uses the dotenv package to read the .env files when running outside of Docker. Inside Docker, they are supplied on the Docker Compose run config.

This is to accommodate the recent and excellent cleanup of env var handling: https://github.com/mitodl/mit-open/pull/1179

Checks that the ENVIRONMENT is "local" before reading in the .env files.

Also sets the Webpack dev server to use host 0.0.0.0.

How can this be tested?

This also sets the ENVIRONMENT to docker for yarn run watch:docker. It was set to this at some point previously, though if we see issues, that would be the most likely cause.