-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun-server.sh
executable file
·41 lines (29 loc) · 1.07 KB
/
run-server.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
#!/bin/bash
source .env
if [ -z "$FIELDKIT_DB_HOST" ]; then
export FIELDKIT_DB_HOST=127.0.0.1
fi
if [ -z "$FIELDKIT_POSTGRES_URL" ]; then
export FIELDKIT_POSTGRES_URL=postgres://fieldkit:password@${FIELDKIT_DB_HOST}/fieldkit?sslmode=disable
fi
if [ -z "$FIELDKIT_TIME_SCALE_URL" ]; then
export FIELDKIT_TIME_SCALE_URL=postgres://postgres:password@${FIELDKIT_DB_HOST}:5433/fk?sslmode=disable
fi
export FIELDKIT_ADDR=:8080
export FIELDKIT_HTTP_SCHEME=http
export FIELDKIT_MEDIA_BUCKETS=fk-media,fkprod-media
export FIELDKIT_STREAMS_BUCKETS=fk-streams,fkprod-streams
export FIELDKIT_ARCHIVER=default
export FIELDKIT_WORKERS=5
# Most of the time, development should be fine using this when jumping from
# working on a local machine to accessing that machine over the LAN for testing
# mobile.
export FIELDKIT_API_DOMAIN="{_:127\.0\.0\.1|192\.168\.0\.100}:8080"
# This may need adjustment for testing scenarios where the server returns a URL.
if [ -z "$FIELDKIT_API_HOST" ]; then
export FIELDKIT_API_HOST=http://127.0.0.1:8080
fi
set -xe
make setup server
mkdir -p .fs
build/server "$@"