Skip to content

Commit

Permalink
chore(ci): Add tileserve to be a dependant of the frontend. (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
fergmac authored Nov 29, 2024
1 parent cdf493c commit 61758c6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
64 changes: 32 additions & 32 deletions database/scripts/local_dev/setup.sql
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
SET application_name="container_setup";

-- create extension postgis;
-- create extension postgis_topology;
-- create extension fuzzystrmatch;
-- create extension postgis_tiger_geocoder;
create extension postgis;
create extension postgis_topology;
create extension fuzzystrmatch;
create extension postgis_tiger_geocoder;
create extension pg_stat_statements;
-- create extension pgaudit;
-- create extension plr;
create extension pgaudit;
create extension plr;
create extension "uuid-ossp";

-- alter user postgres password 'PG_ROOT_PASSWORD';
alter user postgres password 'PG_ROOT_PASSWORD';

-- create user "PG_PRIMARY_USER" with REPLICATION PASSWORD 'PG_PRIMARY_PASSWORD';
-- create user "PG_USER" with password 'PG_PASSWORD' SUPERUSER;
create user "PG_PRIMARY_USER" with REPLICATION PASSWORD 'PG_PRIMARY_PASSWORD';
create user "PG_USER" with password 'PG_PASSWORD' SUPERUSER;
create user ftw_reader with password 'PG_PASSWORD';

-- create table primarytable (key varchar(20), value varchar(20));
-- grant all on primarytable to "PG_PRIMARY_USER";
create table primarytable (key varchar(20), value varchar(20));
grant all on primarytable to "PG_PRIMARY_USER";

-- create database "PG_DATABASE";
create database "PG_DATABASE";

-- grant all privileges on database "PG_DATABASE" to "PG_USER";
grant all privileges on database "PG_DATABASE" to "PG_USER";


-- \c "PG_DATABASE"
\c "PG_DATABASE"

-- create extension postgis;
-- create extension postgis_topology;
-- create extension fuzzystrmatch;
-- create extension postgis_tiger_geocoder;
-- create extension pg_stat_statements;
-- create extension pgaudit;
-- create extension plr;
-- create extension "uuid-ossp";
create extension postgis;
create extension postgis_topology;
create extension fuzzystrmatch;
create extension postgis_tiger_geocoder;
create extension pg_stat_statements;
create extension pgaudit;
create extension plr;
create extension "uuid-ossp";

-- \c "PG_DATABASE" "PG_USER";
\c "PG_DATABASE" "PG_USER";

-- create schema "PG_USER";
create schema "PG_USER";



-- create table "PG_USER".testtable (
-- name varchar(30) primary key,
-- value varchar(50) not null,
-- updatedt timestamp not null
-- );
create table "PG_USER".testtable (
name varchar(30) primary key,
value varchar(50) not null,
updatedt timestamp not null
);



-- insert into "PG_USER".testtable (name, value, updatedt) values ('CPU', '256', now());
-- insert into "PG_USER".testtable (name, value, updatedt) values ('MEM', '512m', now());
insert into "PG_USER".testtable (name, value, updatedt) values ('CPU', '256', now());
insert into "PG_USER".testtable (name, value, updatedt) values ('MEM', '512m', now());

-- grant all on "PG_USER".testtable to "PG_PRIMARY_USER";
grant all on "PG_USER".testtable to "PG_PRIMARY_USER";

create schema postgis_ftw;
grant usage on schema postgis_ftw to ftw_reader;
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ services:
ports:
- "7800:7800"
entrypoint: sh -c "sleep 10; /app/pg_tileserv"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7800"]

#############################################################################################
### Frontend ###
Expand Down Expand Up @@ -153,6 +155,8 @@ services:
depends_on:
backend:
condition: service_started
tileserv:
condition: service_started

caddy:
container_name: caddy
Expand Down

0 comments on commit 61758c6

Please sign in to comment.