Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option to select sslmode when connecting to DB in Grafana #2846

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion grafana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ ENV GF_ANALYTICS_REPORTING_ENABLED=FALSE \
GF_SECURITY_DISABLE_GRAVATAR=true \
GF_USERS_ALLOW_SIGN_UP=false \
GF_ANALYTICS_REPORTING_ENABLED=FALSE \
DATABASE_PORT=5432
DATABASE_PORT=5432 \
DATABASE_SSLMODE=disable

USER root

Expand Down
2 changes: 1 addition & 1 deletion grafana/datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ datasources:
password: $DATABASE_PASS
jsonData:
postgresVersion: 1000
sslmode: disable
sslmode: $DATABASE_SSLMODE
version: 1
editable: true
1 change: 1 addition & 0 deletions website/docs/guides/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ services:
- DATABASE_PASS=${TM_DB_PASS}
- DATABASE_NAME=${TM_DB_NAME}
- DATABASE_HOST=database
- DATABASE_SSLMODE=disable
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the default value, I vote not to include it in the documentation at this location.

- GRAFANA_PASSWD=${GRAFANA_PW}
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PW}
Expand Down
1 change: 1 addition & 0 deletions website/docs/guides/traefik.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ services:
- DATABASE_PASS=${TM_DB_PASS}
- DATABASE_NAME=${TM_DB_NAME}
- DATABASE_HOST=database
- DATABASE_SSLMODE=disable
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the default value, I vote not to include it in the documentation at this location.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good practise is to include the default action commented out
# - DATABASE_SSLMODE=disable # defaults to disable

- GRAFANA_PASSWD=${GRAFANA_PW}
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PW}
Expand Down