You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We have to use the postgres user for the db since the Docker image doesn't allow setting the user.
Describe alternatives you've considered
We will use the postgres user for now but since we have multiple tenants in one external db, it would be more secure and nicer to have dedicated users.
Additional context
The user specified in PG_USER would need elevated rights like CREATE_DATABASE, as I would guess. Please correct me if this is not a viable solution, I would just assume it's a simple option considering that it's implemented in the python script setting up the database.
The text was updated successfully, but these errors were encountered:
You referring to the images we use in our docker compose files, I'd guess? It looks like you could actually whip together your own Docker Compose file with a recent Postgres image and specify the Postgres user through the POSTGRES_USER env var:
the python script has the option of setting the user, it would just need to pass this parameter as env. variable in the Dockerfile like
Not sure I understand what you're suggesting---old age, don't judge :-) Can you give me a bit more context? Are you trying to use the QuantumLeap Postgres init container? If so, is this the Docker file you're referring to:
Surely, it'd be nicer to add that option to the Docker file, but it'd need to be done in a backward compatible way. That is, if the PG_USER env var is unset or empty, then don't add the --pg-username "$PG_USER" to the command.
@valluwtf forgot to mention. If all you need to do is create the QuantumLeap DB, then you may be better off not using the init container. In fact, all that the script inside the container does is run this SQL code
Is your feature request related to a problem? Please describe.
We have to use the postgres user for the db since the Docker image doesn't allow setting the user.
Describe the solution you'd like
In https://github.com/orchestracities/ngsi-timeseries-api/blob/master/timescale-container/quantumleap-db-setup.py#L133 the python script has the option of setting the user, it would just need to pass this parameter as env. variable in the Dockerfile like
--pg-user "$PG_USER"
Describe alternatives you've considered
We will use the postgres user for now but since we have multiple tenants in one external db, it would be more secure and nicer to have dedicated users.
Additional context
The user specified in PG_USER would need elevated rights like CREATE_DATABASE, as I would guess. Please correct me if this is not a viable solution, I would just assume it's a simple option considering that it's implemented in the python script setting up the database.
The text was updated successfully, but these errors were encountered: