Reputation: 14165
In my .net core 2 application, I have files
Application is dockerized and I have a docker-compose.yml
with corresponding docker-compose.override.yml.
Inside docker-compose.override.yml
I have ports and Staging
related things using ENV
variables
serviceone:
environment:
- ASPNETCORE_ENVIRONMENT=Staging
- ASPNETCORE_URLS=http://0.0.0.0:5500
ports:
- "5500:5500"
This works perfectly so far, cause I had only one dockerize env (Staging
), Development
one I use only for debugging locally. Now I want to introduce support for QA
by having another docker image for QA.
I'll put appsettings.QA.json
in the solution and my question is:
Should I create another
docker-compose.overrideSTAGING.yml
(or what's the naming convention here) and how will docker-compose know about it's existence?
Currently, I'm using docker-compose up --build
from cli
Upvotes: 0
Views: 119
Reputation: 6501
Should I create another docker-compose.overrideSTAGING.yml (or what's the naming convention here) and how will docker-compose know about it's existence?
Compose only includes docker-compose.yml
and docker-compose.override.yml
files, by default.
You should use the -f
option to include files with different names.
See explanation here.
Upvotes: 1