Closed rhysyngsun closed 3 days ago
@gumaerc I addressed your feedback and also updated the readme to reflect the new config file locations.
@rhysyngsun I will test this again on Monday and take a closer look at the settings Matt mentioned above, but we should probably hold off merging until we know it picks up those settings properly.
Renamed my old .env and tried to use
env/backend.local.env
,env/shared.local/end
,frontend.local.env
but it couldn't seem to findshared.local.env
at least whereCOMPOSE_PROFILES
is, kept getting the error "no service selected"
COMPOSE_PROFILES
still needs to be defined in a root .env
file or as an exported environment variable in your shell. This is because the behavior of it being picked up in that file is a feature of docker compose
. We just happened to be also using this file for our own .env
. I'll update the readme to make that clear and remove COMPOSE_PROFILES
from the shared.local.example.env
file.
Renamed my old .env and tried to use
env/backend.local.env
,env/shared.local/end
,frontend.local.env
but it couldn't seem to findshared.local.env
at least whereCOMPOSE_PROFILES
is, kept getting the error "no service selected"
COMPOSE_PROFILES
still needs to be defined in a root.env
file or as an exported environment variable in your shell. This is because the behavior of it being picked up in that file is a feature ofdocker compose
. We just happened to be also using this file for our own.env
. I'll update the readme to make that clear and removeCOMPOSE_PROFILES
from theshared.local.example.env
file.
I tested this again today and confirmed that COMPOSE_PROFILES
needs to be set at the root level, but the other vars pull just fine from the more specific env files.
What are the relevant tickets?
Closes https://github.com/mitodl/hq/issues/4602 Closes https://github.com/mitodl/hq/issues/4611
Description (What does it do?)
env_file
so that it's split up between frontend vs. backend so it's generally cleaner and not as noisy.How can this be tested?
.env
file as I left support for that in placeenv/frontend.local.env
andenv/backend.local.env
. There's alsoenv/shared.local.env
, but that is mainly for theMITOPEN_API_BASE_URL
andMITOPEN_APP_BASE_URL
vars..env
file(s) that are now defined by default in the checked in.env
files. A lot of time we just ended up leaving what was in.env
and this should hopefully make that file a lot less noisy.docker compose up
with the different combinations ofCOMPOSE_PROFILES
set.8062
(e.g. http://open.odl.local:8062/). The API and django-admin are still on port8063
.docker compose run --rm web bash
, etc.