Devop files for geoapi-database.
Use Makefile:
make stop
make start
- When initially deploying the postgis container on a new host,
- In the /geoapi/devops/database/docker-compose-database.yml file,
- Before running the intital
make startcommand, - Comment out line 7:
#- ./postgresql.conf:/var/lib/postgresql/data/postgresql.conf:ro, - IF YOU DO NOT you will encounter permission errors on the
/databasefolder on the host system. - After the initial container deployment is running and the db is initialized,
- Stop the container
make stop, - Edit the config to re-enable line 7 in the
postgresql.conf file:#- ./postgresql.conf:/var/lib/postgresql/data/postgresql.conf:ro, - Start the container again with
make start, - It should now successfully run using the custom
postgresql.conffile.
To verify settings in the running container:
ssh geoapi-database.*# ssh into hostsudo -i# become rootdocker exec -it geoapi_postgres bash# exec into containersu - postgres# become postgrespsql -U geoapi -c 'SHOW config_file'# get config file locationexit# exit postgrescat /var/lib/postgresql/data/postgresql.conf# display the config fileexit# exit containerexit# exit rootexit# exit host