Files
deploy-sourcegraph-docker/deploy-frontend.sh
T
Stephen Gutekanst bbdb35c8ad correction: ZOEKT_HOST is host:port format, not http://host:port
I incorrectly thought ZOEKT_HOST supported URL syntax, when in reality it is
host:port syntax format only. Additionally, my prior test that this was true
turned out to be invalid. I've tested properly this time to ensure this is
true and functioning properly.

See https://github.com/sourcegraph/sourcegraph/issues/1727 for more details
2019-01-08 20:17:03 -07:00

38 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
# Description: Serves the frontend of Sourcegraph via HTTP(S).
#
# CPU: 2
# Memory: 4GB
# Disk: 1GB / non-persistent SSD (only for read-only config file)
# Network: 100mbps
# Liveness probe: HTTP GET http://sourcegraph-frontend:3080/healthz
# Ports exposed to other Sourcegraph services: none
# Ports exposed to the public internet: 3080 (HTTP) and/or 3443 (HTTPS)
#
docker run --detach \
--name=sourcegraph-frontend \
--network=sourcegraph \
--restart=always \
-e PGHOST=pgsql \
-e SRC_GIT_SERVERS=gitserver-0:3178 \
-e SEARCHER_URL=http://searcher-0:3181 \
-e SYMBOLS_URL=http://symbols-0:3184 \
-e SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090 \
-e ZOEKT_HOST=zoekt-webserver:6070 \
-p 127.0.0.1:3080:3080 \
sourcegraph/frontend:3.0.0-alpha.9
# For HTTPS instead of HTTP (3080), add the following to 'docker create' above:
# -p 127.0.0.1:3443:3443 \
# -e TLS_CERT=$MY_SECRET_TLS_CERT \
# -e TLS_KEY=$MY_SECRET_TLS_KEY \
# Note: SRC_GIT_SERVERS, SEARCHER_URL, and SYMBOLS_URL are space-separated
# lists which each allow you to specify more container instances for scaling
# purposes. Be sure to also apply such a change here to the frontend-internal
# service.
echo "Deployed sourcegraph-frontend service"