forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyntect_server
More file actions
executable file
·26 lines (21 loc) · 877 Bytes
/
syntect_server
File metadata and controls
executable file
·26 lines (21 loc) · 877 Bytes
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
#!/usr/bin/env bash
set -euf -o pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.." # cd to repo root dir
if [[ ${USE_SYNTECT_SERVER_FROM_PATH-} == t* ]]; then
# NB: this is NOT the common path - below is.
export QUIET='true'
export ROCKET_SECRET_KEY="SeerutKeyIsI7releuantAndknvsuZPluaseIgnorYA="
export ROCKET_ENV="production"
export ROCKET_LIMITS='{json=10485760}'
export ROCKET_PORT=9238
if [[ "${INSECURE_DEV:-}" == '1' ]]; then
export ROCKET_ADDRESS='127.0.0.1'
fi
exec syntect_server
fi
addr=''
if [[ "${INSECURE_DEV:-}" == '1' ]]; then
addr='-e ROCKET_ADDRESS=0.0.0.0'
fi
docker inspect syntect_server > /dev/null 2>&1 && docker rm -f syntect_server
exec docker run --name=syntect_server --rm -p9238:9238 ${addr} sourcegraph/syntect_server:2b5a3fb@sha256:ef5529cafdc68d5a21edea472ee8ad966878b173044aa5c3db93bc3d84765b1f