Open dziedrius opened 1 year ago
Can you share your nginx config as well? Are you doing host name routing to other local services that mock out those APIs?
Sure, currently used nginx config looks something like this:
server {
listen 443 ssl;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
location / {
proxy_pass http://host.docker.internal:5055;
}
}
Where host.docker.internal:5055 is WireMock server running in tests and pretending to be one or another mocked API. We're using self signed certificate, which we trust in other containers.
Currently we're not using routing to other local services, but that is due the fact, that for development locally we use tye for it's faster startup/easier debugging and docker-compose only for integration tests due to ability to do network aliases. If tye would support network aliases, I think we would use routing to local services too, as we like to have same url schema as in prod (hence in IIS we use host names too - like api.local.domain.com).
What should we add or change to make your life better?
Docker compose has ability to add network aliases like this:
meaning, that I can access my services by DNS names - which might serve at least couple purposes:
Why is this important to you?
Currently we have two configs - docker-compose and tye just because we can't fully control host names in tye and we need that for our integration tests, as we need to mock out several third party APIs.