Skip to content

Commit

Permalink
Fix docker demo database initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed Sep 16, 2024
1 parent 7428a53 commit 43f42a5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions demo-docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ services:
#- POSTGRES_PASSWORD=passw0rd
volumes:
- ./postgres_seed:/docker-entrypoint-initdb.d/
- ./sql_data:/sql_data
#- ./timescale:/var/lib/postgresql
# to export postgresql port on main host!
ports:
Expand Down
7 changes: 3 additions & 4 deletions demo-docker/postgres_seed/init-user-db.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
psql -h 127.0.0.1 -U postgres -w -f data/create_tables.sql template1
psql -h 127.0.0.1 -U postgres -w -f data/metabaseappdb.sql metabaseappdb
psql -h 127.0.0.1 -U postgres -w -f data/grafanaappdb.sql grafanaappdb

psql -U postgres -w -f /sql_data/create_tables.sql template1
psql -U postgres -w -f /sql_data/grafanaappdb.sql grafanaappdb
psql -U postgres -w -f /sql_data/metabaseappdb.sql metabaseappdb
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SET row_security = off;
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA public;
CREATE SCHEMA IF NOT EXISTS public;


ALTER SCHEMA public OWNER TO postgres;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion sql/grafanaappdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SET row_security = off;
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--

CREATE SCHEMA public;
CREATE SCHEMA IF NOT EXISTS public;


ALTER SCHEMA public OWNER TO postgres;
Expand Down

0 comments on commit 43f42a5

Please sign in to comment.