Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
# https://caddyserver.com/docs/caddyfile
caddy:
container_name: caddy
image: 'index.docker.io/caddy:2.7.4-alpine@sha256:3d1bf053476f2415b40e728c37e1112ee7551fa154a63d6f62b275c13fea8166'
image: 'index.docker.io/caddy:2.7.6-alpine@sha256:80ca561981768b2c3568cc4bef3d4cd1f11c2a625c806bedeb8453aef98779a0'
cpus: 4
mem_limit: '4g'
environment:
Expand Down
57 changes: 28 additions & 29 deletions pure-docker/deploy-caddy.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
#!/usr/bin/env bash
set -e

# Description: Acts as a reverse proxy for all of the sourcegraph-frontend instances
#
# Disk: 1GB / persistent SSD
# Ports exposed to other Sourcegraph services: none
# Ports exposed to the public internet: 80 (HTTP) and 443 (HTTPS)
#
# Sourcegraph ships with a few builtin templates that cover common HTTP/HTTPS configurations:
# - HTTP only (default)
# - HTTPS with Let's Encrypt
# - HTTPS with custom certificates
#
# Follow the directions in the comments below to swap between these configurations.
#
# If none of these built-in configurations suit your needs, then you can create your own Caddyfile, see:
# https://caddyserver.com/docs/caddyfile
# Description: Acts as a reverse proxy for all of the sourcegraph-frontend instances
#
# Disk: 1GB / persistent SSD
# Ports exposed to other Sourcegraph services: none
# Ports exposed to the public internet: 80 (HTTP) and 443 (HTTPS)
#
# Sourcegraph ships with a few builtin templates that cover common HTTP/HTTPS configurations:
# - HTTP only (default)
# - HTTPS with Let's Encrypt
# - HTTPS with custom certificates
#
# Follow the directions in the comments below to swap between these configurations.
#
# If none of these built-in configurations suit your needs, then you can create your own Caddyfile, see:
# https://caddyserver.com/docs/caddyfile

VOLUME="$HOME/sourcegraph-docker/caddy-storage"
./ensure-volume.sh $VOLUME 100
docker run --detach \
--name=caddy \
--network=sourcegraph \
--restart=always \
--cpus="4" \
--memory=4g \
-e XDG_DATA_HOME="/caddy-storage/data" \
-e XDG_CONFIG_HOME="/caddy-storage/config" \
-e SRC_FRONTEND_ADDRESSES="sourcegraph-frontend-0:3080" \
-p 0.0.0.0:80:80 \
-p 0.0.0.0:443:443 \
-v $VOLUME:/caddy-storage \
--mount type=bind,source="$(pwd)"/../caddy/builtins/http.Caddyfile,target=/etc/caddy/Caddyfile \
index.docker.io/caddy:2.7.4-alpine@sha256:3d1bf053476f2415b40e728c37e1112ee7551fa154a63d6f62b275c13fea8166

--name=caddy \
--network=sourcegraph \
--restart=always \
--cpus="4" \
--memory=4g \
-e XDG_DATA_HOME="/caddy-storage/data" \
-e XDG_CONFIG_HOME="/caddy-storage/config" \
-e SRC_FRONTEND_ADDRESSES="sourcegraph-frontend-0:3080" \
-p 0.0.0.0:80:80 \
-p 0.0.0.0:443:443 \
-v "$VOLUME:/caddy-storage" \
--mount type=bind,source="$(pwd)"/../caddy/builtins/http.Caddyfile,target=/etc/caddy/Caddyfile \
index.docker.io/caddy:2.7.6-alpine@sha256:80ca561981768b2c3568cc4bef3d4cd1f11c2a625c806bedeb8453aef98779a0