This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generateEnvs.sh
executable file
·43 lines (32 loc) · 2 KB
/
generateEnvs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# creates ENVs and puts them into .env.local file
# NOTE: this is ONLY used for development purposes only.
set -x
# generate ENVs
echo -n '' > .env.local # empty the .env.local file
echo "NEXT_PUBLIC_BUILD_VERSION=$(npm run -s generateVersion)" >> .env.local;
echo "NEXT_PUBLIC_BUILD_ID=$(npm run -s generateBuildId)" >> .env.local;
# iron session
echo "SECRET_COOKIE_PASSWORD=cteBV25ymu4HnVAvhDVf46JbGxZePA6Q" >> .env.local;
echo "SECURE_COOKIE_TTL=$(expr 5 \* 60 \* 60)" >> .env.local; # time in seconds
echo "NEXT_PUBLIC_POLLING_AUTH_SESSION=1000" >> .env.local
# fetching from /api/summary
echo "NEXT_PUBLIC_POLLING_SUMMARY=2000" >> .env.local # time in milliseconds
# fetching from /api/forwardedDestinations
echo "NEXT_PUBLIC_POLLING_FORWARDED_DESTINATIONS=60000" >> .env.local # time in milliseconds
# fetching from /api/queryTypes
echo "NEXT_PUBLIC_POLLING_QUERY_TYPES=60000" >> .env.local # time in milliseconds
# top permitted and blocked queries
echo "NEXT_PUBLIC_POLLING_TOP_PERMITTED_QUERIES=10000" >> .env.local # time in milliseconds
echo "NEXT_PUBLIC_POLLING_TOP_BLOCKED_QUERIES=10000" >> .env.local # time in milliseconds
echo "NEXT_PUBLIC_NUM_ENTRIES_TOP_PERMITTED_QUERIES=10" >> .env.local
echo "NEXT_PUBLIC_NUM_ENTRIES_TOP_BLOCKED_QUERIES=10" >> .env.local
# Top clients and Top clients blocked
echo "NEXT_PUBLIC_POLLING_TOP_CLIENTS_ALLOWED_QUERIES=10000" >> .env.local # time in milliseconds
echo "NEXT_PUBLIC_POLLING_TOP_CLIENTS_BLOCKED_QUERIES=10000" >> .env.local # time in milliseconds
echo "NEXT_PUBLIC_NUM_ENTRIES_TOP_CLIENTS_ALLOWED_QUERIES=10" >> .env.local
echo "NEXT_PUBLIC_NUM_ENTRIES_TOP_CLIENTS_BLOCKED_QUERIES=10" >> .env.local
# queries overtime (for bar chart)
echo "NEXT_PUBLIC_POLLING_QUERIES_OVERTIME=600000" >> .env.local # time in milliseconds
# clients overtime (for bar chart)
echo "NEXT_PUBLIC_POLLING_CLIENTS_OVERTIME=600000" >> .env.local # time in milliseconds