Changes in the Dockerfile and files for each environment added:#4
Changes in the Dockerfile and files for each environment added:#4agpenton wants to merge 1 commit intogeosolutions-it:C207-OSMfrom
Conversation
- build-args "P_ENV" added for conditional ENV. - postgresql.dev.conf for DEV environment added. - postgresql.prod.conf for PROD environment added.
randomorder
left a comment
There was a problem hiding this comment.
This is not documented anywhere?
Can't we just bind-mount the configuration file at run time?
It's not documented but is in the Makefile, I will update the README.md to add this as a note in the PostgreSQL step.
The problem with just mount is that every time that you want to run one of the environment you will need to change the file in the docker-compose.yml and add a command to the service specifying where is the config file, in this way you just build the image for the environment that you need, and another point is that with the PostgreSQL when initializing the database if the command for the config file doesn't exist will ignore it. |
Fix it then
No because each env has it's own file in the same location..
Please explain., I do not understand |
The PR for the documentation is https://github.com/geosolutions-it/C207-OSM/pull/22
if you want to have two directories that each contain one environment, then ok.
For example, if you mount the postgresql.conf file to the default path, when the Postgres initialize the database and see that have data in the volume, will skip the initialization because the directory is not empty. So you will have to mount the file to another location, and add a command to the PostgreSQL service, ex: |
all above resolve geosolutions-it/C207-OSM#20