Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
brian-dashboard-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
brian
brian-dashboard-manager
Commits
9ed1d689
Commit
9ed1d689
authored
3 years ago
by
Sam Roberts
Browse files
Options
Downloads
Patches
Plain Diff
remove unneeded postgres setup in docker compose (sqlite is fine)
parent
245742a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-setup/config/grafana.ini
+1
-2
1 addition, 2 deletions
docker-setup/config/grafana.ini
docker-setup/docker-compose.yaml
+0
-13
0 additions, 13 deletions
docker-setup/docker-compose.yaml
docker-setup/entrypoint.sh
+0
-43
0 additions, 43 deletions
docker-setup/entrypoint.sh
with
1 addition
and
58 deletions
docker-setup/config/grafana.ini
+
1
−
2
View file @
9ed1d689
...
...
@@ -57,8 +57,7 @@ logging = true
[database]
# Either "mysql", "postgres" or "sqlite3", it's your choice
type
=
postgres
host
=
postgres
type
=
sqlite3
name
=
grafana
user
=
grafana
password
=
grafana
...
...
This diff is collapsed.
Click to expand it.
docker-setup/docker-compose.yaml
+
0
−
13
View file @
9ed1d689
...
...
@@ -10,17 +10,4 @@ services:
-
./config:/etc/grafana/
environment
:
-
GF_INSTALL_PLUGINS=grafana-simple-json-datasource
postgres
:
restart
:
always
build
:
context
:
.
args
:
DBUSER
:
grafana
DBPASS
:
grafana
DBNAME
:
grafana
hostname
:
postgres
ports
:
-
"
5432:5432"
volumes
:
-
./postgresdata:/var/lib/postgresql:z
This diff is collapsed.
Click to expand it.
docker-setup/entrypoint.sh
deleted
100755 → 0
+
0
−
43
View file @
245742a8
#!/bin/sh
# Entrypoint for the containerized database
# Ensures the required setup is performed on the share before
# starting the database
if
[
"
$PGDATA
"
=
""
]
then
echo
"Environment variable PGDATA is not set"
exit
1
fi
if
[
!
-d
"
$PGDATA
"
]
then
echo
"Directory
$PGDATA
does not exist - no volume mounted?"
exit
2
fi
# Postgres will refuse to work on a non-empty folder when initializing and the
# mount point might have a dotfile
PGDATA
=
"
$PGDATA
/9.6"
echo
$PGDATA
echo
$DBNAME
echo
$DBUSER
if
[
!
-d
"
$PGDATA
"
]
then
echo
"Database seems to be uninitialized - doing so"
mkdir
$PGDATA
initdb
--pgdata
=
$PGDATA
&&
\
pg_ctl start
&&
\
sleep
4
&&
\
createuser
-d
-l
-s
$DBUSER
&&
\
createdb
-O
$DBUSER
$DBNAME
&&
\
psql
-c
"ALTER ROLE
$DBUSER
WITH PASSWORD '
$DBPASS
'"
&&
\
psql
-a
$DBNAME
-c
'CREATE EXTENSION "uuid-ossp" WITH SCHEMA pg_catalog'
&&
\
echo
"host all all all md5"
>>
$PGDATA
/pg_hba.conf
&&
\
echo
"listen_addresses = '0.0.0.0'"
>>
$PGDATA
/postgresql.conf
&&
\
pg_ctl stop
fi
exec
/usr/bin/postgres
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