Hello I'm starting with docker and docker compose and I have the following problem:
I'm working in a spring micro services architecture where I have one configuration service, one discovery service, one gateway service and multiple resource services. To run these services, I build jar files, which I place in separated folder per service with their config files (application.yml and bootstrap.yml): e.g:
config-service/
- config-service.jar
- application.yml
discovery-service/
- discovery-service.jar
- bootstrap.yml
gateway-service/
- gateway-service.jar
- bootstrap.yml
crm-service/
- crm-service.jar
- bootstrap.yml
This works so far on my server.
Now I want to deploy my services in different environments as docker images (created with mvn build image and buildpack) using docker compose, where the configuration files vary depending on the environment. How can I deploy a service as a container using an existing image but with a different configuration file?
Thank you in advance!