|
1 | 1 | #!/usr/bin/env bash |
2 | 2 | set -e |
3 | 3 |
|
4 | | - # Description: Acts as a reverse proxy for all of the sourcegraph-frontend instances |
5 | | - # |
6 | | - # Disk: 1GB / persistent SSD |
7 | | - # Ports exposed to other Sourcegraph services: none |
8 | | - # Ports exposed to the public internet: 80 (HTTP) and 443 (HTTPS) |
9 | | - # |
10 | | - # Sourcegraph ships with a few builtin templates that cover common HTTP/HTTPS configurations: |
11 | | - # - HTTP only (default) |
12 | | - # - HTTPS with Let's Encrypt |
13 | | - # - HTTPS with custom certificates |
14 | | - # |
15 | | - # Follow the directions in the comments below to swap between these configurations. |
16 | | - # |
17 | | - # If none of these built-in configurations suit your needs, then you can create your own Caddyfile, see: |
18 | | - # https://caddyserver.com/docs/caddyfile |
| 4 | +# Description: Acts as a reverse proxy for all of the sourcegraph-frontend instances |
| 5 | +# |
| 6 | +# Disk: 1GB / persistent SSD |
| 7 | +# Ports exposed to other Sourcegraph services: none |
| 8 | +# Ports exposed to the public internet: 80 (HTTP) and 443 (HTTPS) |
| 9 | +# |
| 10 | +# Sourcegraph ships with a few builtin templates that cover common HTTP/HTTPS configurations: |
| 11 | +# - HTTP only (default) |
| 12 | +# - HTTPS with Let's Encrypt |
| 13 | +# - HTTPS with custom certificates |
| 14 | +# |
| 15 | +# Follow the directions in the comments below to swap between these configurations. |
| 16 | +# |
| 17 | +# If none of these built-in configurations suit your needs, then you can create your own Caddyfile, see: |
| 18 | +# https://caddyserver.com/docs/caddyfile |
19 | 19 |
|
20 | 20 | VOLUME="$HOME/sourcegraph-docker/caddy-storage" |
21 | 21 | ./ensure-volume.sh $VOLUME 100 |
22 | 22 | docker run --detach \ |
23 | | - --name=caddy \ |
24 | | - --network=sourcegraph \ |
25 | | - --restart=always \ |
26 | | - --cpus="4" \ |
27 | | - --memory=4g \ |
28 | | - -e XDG_DATA_HOME="/caddy-storage/data" \ |
29 | | - -e XDG_CONFIG_HOME="/caddy-storage/config" \ |
30 | | - -e SRC_FRONTEND_ADDRESSES="sourcegraph-frontend-0:3080" \ |
31 | | - -p 0.0.0.0:80:80 \ |
32 | | - -p 0.0.0.0:443:443 \ |
33 | | - -v $VOLUME:/caddy-storage \ |
34 | | - --mount type=bind,source="$(pwd)"/../caddy/builtins/http.Caddyfile,target=/etc/caddy/Caddyfile \ |
35 | | - index.docker.io/caddy:2.7.4-alpine@sha256:3d1bf053476f2415b40e728c37e1112ee7551fa154a63d6f62b275c13fea8166 |
36 | | - |
| 23 | + --name=caddy \ |
| 24 | + --network=sourcegraph \ |
| 25 | + --restart=always \ |
| 26 | + --cpus="4" \ |
| 27 | + --memory=4g \ |
| 28 | + -e XDG_DATA_HOME="/caddy-storage/data" \ |
| 29 | + -e XDG_CONFIG_HOME="/caddy-storage/config" \ |
| 30 | + -e SRC_FRONTEND_ADDRESSES="sourcegraph-frontend-0:3080" \ |
| 31 | + -p 0.0.0.0:80:80 \ |
| 32 | + -p 0.0.0.0:443:443 \ |
| 33 | + -v "$VOLUME:/caddy-storage" \ |
| 34 | + --mount type=bind,source="$(pwd)"/../caddy/builtins/http.Caddyfile,target=/etc/caddy/Caddyfile \ |
| 35 | + index.docker.io/caddy:2.7.6-alpine@sha256:80ca561981768b2c3568cc4bef3d4cd1f11c2a625c806bedeb8453aef98779a0 |
0 commit comments