diff --git a/website.Dockerfile b/website.Dockerfile index 5e08a80..8bab500 100644 --- a/website.Dockerfile +++ b/website.Dockerfile @@ -31,7 +31,7 @@ COPY --from=build /build/website/static ./static COPY --from=build /build/website/templates ./templates ## ensure the container listens globally on port 8080 -ENV ROCKET_ADDRESS=0.0.0.0 +ENV ROCKET_ADDRESS=:: ENV ROCKET_PORT=8080 EXPOSE 8080 diff --git a/website/.sqlx/query-5aa59a3d560beee3b4c2137e3a0e45552aa6a684356773f268f1f0cc226e5b5e.json b/website/.sqlx/query-5aa59a3d560beee3b4c2137e3a0e45552aa6a684356773f268f1f0cc226e5b5e.json new file mode 100644 index 0000000..44e14ba --- /dev/null +++ b/website/.sqlx/query-5aa59a3d560beee3b4c2137e3a0e45552aa6a684356773f268f1f0cc226e5b5e.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT *\n FROM whitelist\n WHERE $1 = domain\n OR $1 LIKE CONCAT('%.', domain)\n ORDER BY LENGTH(domain) DESC\n LIMIT 1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "domain", + "type_info": "Varchar" + }, + { + "ordinal": 1, + "name": "rank", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "last_ok", + "type_info": "Timestamp" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + true, + true, + true + ] + }, + "hash": "5aa59a3d560beee3b4c2137e3a0e45552aa6a684356773f268f1f0cc226e5b5e" +} diff --git a/website/.sqlx/query-6a4cd9fd07e9ee53e6c2098b14fc6f4ab5b1704ffad21e615492b2889d9163f7.json b/website/.sqlx/query-6a4cd9fd07e9ee53e6c2098b14fc6f4ab5b1704ffad21e615492b2889d9163f7.json new file mode 100644 index 0000000..f5a35ba --- /dev/null +++ b/website/.sqlx/query-6a4cd9fd07e9ee53e6c2098b14fc6f4ab5b1704ffad21e615492b2889d9163f7.json @@ -0,0 +1,42 @@ +{ + "db_name": "PostgreSQL", + "query": "WITH bins AS (\n SELECT generate_series(0, $1 - 1) AS bin\n)\nSELECT\n b.bin as bin_id,\n b.bin * $2 + 1 AS bin_min_rank,\n (b.bin + 1) * $2 AS bin_max_rank,\n COUNT(case when not $3 or w.domain not like '%.co.uk' then 1 end) AS count\nFROM bins b\nLEFT JOIN whitelist w\n ON FLOOR(w.rank / $2) = b.bin\nGROUP BY b.bin\nORDER BY b.bin;", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "bin_id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "bin_min_rank", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "bin_max_rank", + "type_info": "Int4" + }, + { + "ordinal": 3, + "name": "count", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Bool" + ] + }, + "nullable": [ + null, + null, + null, + null + ] + }, + "hash": "6a4cd9fd07e9ee53e6c2098b14fc6f4ab5b1704ffad21e615492b2889d9163f7" +} diff --git a/website/.sqlx/query-78b942fd1bf87ab38b9fb1611decf1827e5343981ec88aa0022bd7c44cd5f9d0.json b/website/.sqlx/query-78b942fd1bf87ab38b9fb1611decf1827e5343981ec88aa0022bd7c44cd5f9d0.json new file mode 100644 index 0000000..fc22814 --- /dev/null +++ b/website/.sqlx/query-78b942fd1bf87ab38b9fb1611decf1827e5343981ec88aa0022bd7c44cd5f9d0.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id, name FROM reporters WHERE token = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Varchar" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "78b942fd1bf87ab38b9fb1611decf1827e5343981ec88aa0022bd7c44cd5f9d0" +} diff --git a/website/.sqlx/query-da78a4ed929ca7460cd98c7fb6b6ef10a987644e1b879af2782cf318f12f60b6.json b/website/.sqlx/query-da78a4ed929ca7460cd98c7fb6b6ef10a987644e1b879af2782cf318f12f60b6.json new file mode 100644 index 0000000..fb95966 --- /dev/null +++ b/website/.sqlx/query-da78a4ed929ca7460cd98c7fb6b6ef10a987644e1b879af2782cf318f12f60b6.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO human_reports (id, source_ip, works) VALUES ($1, $2, $3)", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Uuid", + "Varchar", + "Bool" + ] + }, + "nullable": [] + }, + "hash": "da78a4ed929ca7460cd98c7fb6b6ef10a987644e1b879af2782cf318f12f60b6" +} diff --git a/website/.sqlx/query-ea9307414ca1375dea4b9ef49ddfb0d679bbd6971b2ca75d25fbaf6fdc04951d.json b/website/.sqlx/query-ea9307414ca1375dea4b9ef49ddfb0d679bbd6971b2ca75d25fbaf6fdc04951d.json new file mode 100644 index 0000000..898e371 --- /dev/null +++ b/website/.sqlx/query-ea9307414ca1375dea4b9ef49ddfb0d679bbd6971b2ca75d25fbaf6fdc04951d.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "REFRESH MATERIALIZED VIEW whitelist", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "ea9307414ca1375dea4b9ef49ddfb0d679bbd6971b2ca75d25fbaf6fdc04951d" +}