Skip to content

Commit

Permalink
fix docker and terraform (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
CRBl69 authored May 23, 2024
1 parent defd133 commit 2651683
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions sql_extensions/00000_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ CREATE TABLE sql_extensions (
name TEXT PRIMARY KEY
);


CREATE USER web_anon NOLOGIN;
GRANT web_anon TO postgres;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO web_anon;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO web_anon;
1 change: 1 addition & 0 deletions terraform/modules/db/run-migrations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ ls
sleep 5 # Give proxy time to start up.
echo "Running..."
bash ../sql_extensions/apply-sql-extensions.sh
psql "$DATABASE_URL" -c 'GRANT web_anon TO postgres'
# https://unix.stackexchange.com/a/104825
kill $(pgrep cloud-sql-proxy)
2 changes: 1 addition & 1 deletion terraform/modules/mqtt/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data "external" "ip" {
join(" ", [
"gcloud compute instances list",
"--filter name=mqtt",
"--format json(networkInterfaces[0].accessConfigs[0].natIP)",
"--format 'json(networkInterfaces[0].accessConfigs[0].natIP)'",
]),
# Parse natural IP address field from JSON output.
"| jq '.[0].networkInterfaces[0].accessConfigs[0]'",
Expand Down

0 comments on commit 2651683

Please sign in to comment.