I was facing difficulty in accessing data from the database with pgadmin4. So was thinking if we can change the container configuration and use a separate container to run postgres which can run behind nginx and will than be easy to access.
While creating a docker image i tried with that approach also … but i do remember that i was facing an issue of connecting API with database. So i left that approach !
By the way … for database connectivity issue … you can try manual installation … i never faced any problem with manual installation regarding database connectivity !
We have one example which is using multi-container approach … https://hasura.io/docs/1.0/graphql/manual/getting-started/docker-simple.html
giving below their docker compose file
HASURA_GRAPHQL_ENABLE_CONSOLE: “true” # set to “false” to disable console
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
## uncomment next line to set an admin secret
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
but when we start add service postgresql to docker-compose.yml file the nbs api also has a builtin posgresql running. If we stop the postgresql and restart the nbs api container it keeps on restarting.
We need to create a new docker image … we need to start everything from scratch !