mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-04 00:05:19 -07:00
34 lines
1.4 KiB
YAML
34 lines
1.4 KiB
YAML
version: '2.4'
|
|
services:
|
|
executor:
|
|
container_name: executor
|
|
image: 'index.docker.io/sourcegraph/executor:insiders@sha256:21ed2073df3ae60ac548546e6ecc3a2c3c00b31c635df67508ee11079d5bf156'
|
|
cpus: 1
|
|
mem_limit: '4g'
|
|
# Run as root (required for docker daemon control)
|
|
user: root
|
|
# Run with privileged capabilities (required for docker daemon control)
|
|
privileged: true
|
|
environment:
|
|
# Refer to https://docs.sourcegraph.com/admin/deploy_executors_binary#step-2-setup-environment-variables on how to populate these variables
|
|
- EXECUTOR_FRONTEND_URL=http://sourcegraph-frontend-0:3080
|
|
# Note: Must match `executors.accessToken` in site config
|
|
- EXECUTOR_FRONTEND_PASSWORD=
|
|
# Choose what work to process
|
|
- EXECUTOR_QUEUE_NAME=
|
|
# Note: Must match left-hand side of scratch volume mount
|
|
- EXECUTOR_DOCKER_HOST_MOUNT_PATH=/tmp/sourcegraph/executor-scratch
|
|
# Note: Must match right-hand side of scratch volume mount
|
|
- TMPDIR=/scratch
|
|
# Run as root (required for docker daemon control)
|
|
- UID=1000
|
|
- GID=1000
|
|
volumes:
|
|
# Mount docker socket
|
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
|
# Mount volume for workspaces shared by executor and launched containers
|
|
- '/tmp/sourcegraph/executor-scratch:/scratch'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|