Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
ma_code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven-Ove Hänsel
ma_code
Commits
68f1d9ce
Commit
68f1d9ce
authored
9 months ago
by
julian
Browse files
Options
Downloads
Patches
Plain Diff
Changed passwords to use docker secrets to practice best practices
parent
9c257110
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.env
+0
-2
0 additions, 2 deletions
.env
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
.pgpass
+1
-0
1 addition, 0 deletions
.pgpass
docker-compose.yml
+19
-5
19 additions, 5 deletions
docker-compose.yml
pgadminpass.txt
+1
-0
1 addition, 0 deletions
pgadminpass.txt
with
22 additions
and
7 deletions
.env
+
0
−
2
View file @
68f1d9ce
# postgres
PGUSER=postgres
PGPASSWORD=postgres
PGDATABASE=postgres
PGHOST=postgres
...
...
@@ -17,7 +16,6 @@ QUERY_INTERVAL=1
# pgadmin
PGADMIN_DEFAULT_EMAIL=admin@abc.de
PGADMIN_DEFAULT_PASSWORD=admin
# grafana
DS_PROMETHEUS=prometheus_src
This diff is collapsed.
Click to expand it.
.gitignore
+
1
−
0
View file @
68f1d9ce
...
...
@@ -2,3 +2,4 @@
__pycache__
.mypy_cache
/streaming/pub/data/
/output
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.pgpass
0 → 100644
+
1
−
0
View file @
68f1d9ce
*:*:*:*:postgres
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
19
−
5
View file @
68f1d9ce
...
...
@@ -18,7 +18,9 @@ services:
-
PGHOST
-
PGDATABASE
-
PGUSER
-
PGPASSWORD
-
PGPASSFILE=/run/secrets/postgres_pass
secrets
:
-
postgres_pass
depends_on
:
mosquitto
:
condition
:
service_started
...
...
@@ -32,10 +34,12 @@ services:
-
PGHOST
-
PGDATABASE
-
PGUSER
-
PGPASS
WORD
-
PGPASS
FILE=/run/secrets/postgres_pass
-
QUERY_INTERVAL
volumes
:
-
query-logs:/app/log
secrets
:
-
postgres_pass
depends_on
:
-
sub_pg
...
...
@@ -55,7 +59,7 @@ services:
-
PGUSER
-
POSTGRES_USER=$PGUSER
-
POSTGRES_DB=$PGDATABASE
-
POSTGRES_PASSWORD
=$PGPASSWORD
-
POSTGRES_PASSWORD
_FILE=/run/secrets/postgres_pass
healthcheck
:
test
:
pg_isready -U postgres
start_period
:
5s
...
...
@@ -65,13 +69,15 @@ services:
-
postgres-logs:/var/log/postgresql
configs
:
-
postgres_conf
secrets
:
-
postgres_pass
pgadmin
:
image
:
dpage/pgadmin4
environment
:
-
PGADMIN_DEFAULT_EMAIL
-
PGADMIN_DEFAULT_PASSWORD
-
PGADMIN_DEFAULT_PASSWORD
_FILE=/run/secrets/pgadmin_pass
profiles
:
-
experiment
-
inspect
...
...
@@ -79,6 +85,8 @@ services:
-
80:80
volumes
:
-
postgres-admin:/var/lib/pgadmin
secrets
:
-
pgadmin_pass
grafana
:
image
:
grafana/grafana-oss
...
...
@@ -106,6 +114,7 @@ services:
cadvisor
:
image
:
gcr.io/cadvisor/cadvisor
privileged
:
true
profiles
:
-
experiment
ports
:
...
...
@@ -118,7 +127,6 @@ services:
-
/dev/disk/:/dev/disk:ro
devices
:
-
/dev/kmsg
privileged
:
true
postgres_exporter
:
image
:
bitnami/postgres-exporter
...
...
@@ -148,3 +156,9 @@ configs:
file
:
./grafana/dashboard.yaml
grafana_dash_src
:
file
:
./grafana/9628_rev7.json
secrets
:
pgadmin_pass
:
file
:
./pgadminpass.txt
postgres_pass
:
file
:
./.pgpass
This diff is collapsed.
Click to expand it.
pgadminpass.txt
0 → 100644
+
1
−
0
View file @
68f1d9ce
admin
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment