You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/deploy/docker-compose/index.mdx
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,3 @@
1
-
# Sourcegraph with Docker Compose
2
-
3
1
Setting up Docker applications with [multiple containers](https://www.docker.com/resources/what-container) like Sourcegraph using Docker Compose allows us to start all the applications with a single command. It also makes configuring the applications easier through updating the docker-compose.yaml and docker-compose.override.yaml files. Please see the [official Docker Compose docs](https://docs.docker.com/compose/) to learn more about Docker Compose.
4
2
5
3
This guide will take you through how to install Sourcegraph with Docker Compose on a server, which could be the local machine, a server on a local network, or cloud-hosted server. You can also follow one of the available *cloud-specific guides* listed below to prepare and install Sourcegraph on a supported cloud environment:
@@ -115,9 +113,10 @@ Continue with the following steps *after* you have created a public or private c
115
113
- This branch will be used to [upgrade Sourcegraph](/admin/deploy/docker-compose/upgrade) and install your Sourcegraph instance.
116
114
- It also allows us to track all of the customizations made to your Sourcegraph instance.
117
115
118
-
```bash
116
+
117
+
```
119
118
# Specify the version you want to install
120
-
export SOURCEGRAPH_VERSION="v5.6.2535"
119
+
export SOURCEGRAPH_VERSION={CURRENT_VERSION}
121
120
# Check out the selected version for use, in a new branch called "release"
This document describes the process to update a Docker Compose Sourcegraph instance. If you are unfamiliar with sourcegraph versioning or releases see our [general concepts documentation](/admin/updates/).
@@ -8,7 +10,7 @@ This document describes the process to update a Docker Compose Sourcegraph insta
8
10
9
11
A [standard upgrade](/admin/updates/#upgrade-types) occurs between a Sourcegraph version and the minor or major version released immediately after it. If you would like to jump forward several versions, you must perform a [multi-version upgrade](#multi-version-upgrades) instead.
10
12
11
-
If you've [configured Docker Compose with a release branch](/admin/deploy/docker-compose/#step-1-prepare-the-deployment-repository), please merge the upstream release tag for the next minor version into your `release` branch. In the following example, the release branch is being upgraded to v5.6.2535.
13
+
If you've [configured Docker Compose with a release branch](/admin/deploy/docker-compose/#step-1-prepare-the-deployment-repository), please merge the upstream release tag for the next minor version into your `release` branch. In the following example, the release branch is being upgraded to {CURRENT_VERSION_STRING}.
12
14
13
15
```sh
14
16
# first, checkout the release branch
@@ -17,16 +19,16 @@ git checkout release
17
19
git fetch upstream
18
20
# merge the upstream release tag into your release branch
19
21
git checkout release
20
-
git merge v5.6.2535
22
+
git merge {CURRENT_VERSION}
21
23
```
22
24
23
25
#### Address any merge conflicts you might have
24
26
25
27
For each conflict, you need to reconcile any customizations you made with the updates from the new version. Use the information you gathered earlier from the change log and changes list to interpret the merge conflict and to ensure that it doesn't over-write your customizations. You may need to update your customizations to accommodate the new version.
26
28
27
-
> NOTE: If you have made no changes or only very minimal changes to your configuration, you can also ask git to always select incoming changes in the event of merge conflicts. In the following example merges will be accepted from the upstream version v5.6.2535:
29
+
> NOTE: If you have made no changes or only very minimal changes to your configuration, you can also ask git to always select incoming changes in the event of merge conflicts. In the following example merges will be accepted from the upstream version {CURREN_VERSION_STRING()}:
28
30
>
29
-
> `git merge -X theirs v5.6.2535`
31
+
> `git merge -X theirs {CURRENT_VERSION_STRING}`
30
32
>
31
33
> If you do this, make sure your configuration is correct before proceeding because it may have made changes to your docker-compose YAML file.
# Install single-container Sourcegraph with Docker on AWS
2
4
3
5
This tutorial shows you how to deploy [single-container Sourcegraph with Docker](/admin/deploy/docker-single-container/) to a single EC2 instance on AWS.
@@ -33,7 +35,7 @@ This tutorial shows you how to deploy [single-container Sourcegraph with Docker]
33
35
- usermod -a -G docker ec2-user
34
36
35
37
# Install and run Sourcegraph. Restart the container upon subsequent reboots
# Install single-container Sourcegraph with Docker on DigitalOcean
2
4
3
5
This tutorial shows you how to deploy [single-container Sourcegraph with Docker](/admin/deploy/docker-single-container/) to a single node running on DigitalOcean.
@@ -17,7 +19,7 @@ This tutorial shows you how to deploy [single-container Sourcegraph with Docker]
# Install single-container Sourcegraph with Docker on Google Cloud
2
4
3
5
This tutorial shows you how to deploy [single-container Sourcegraph with Docker](/admin/deploy/docker-single-container/) to a single node running on Google Cloud.
@@ -23,7 +25,7 @@ This tutorial shows you how to deploy [single-container Sourcegraph with Docker]
The Docker Single Container deployment type is a way to very quickly get an instance of Sourcegraph set up locally to experiment with many of its features. However, it is **not recommended** for a production instance, and **has limitations** depending on the OS you are deploying to, as well as the associated resources. See the [troubleshooting section](#troubleshooting) for additional information.
Once the server is ready (logo is displayed in the terminal), navigate to the hostname or IP address on port `7080`. Create the admin account, then you'll be guided through setting up Sourcegraph for code searching and navigation.
@@ -46,7 +48,7 @@ For example, to mount a `.gitconfig`, create a file `/mnt/sourcegraph/config/git
46
48
Alternatively you can create a new Docker image which inherits from Sourcegraph and then mutates the environment:
47
49
48
50
```dockerfile
49
-
FROM sourcegraph/server:5.6.2535
51
+
FROM sourcegraph/server:{CURRENT_VERSION_NO_V}
50
52
51
53
COPY gitconfig /etc/gitconfig
52
54
COPY ssh /root/.ssh
@@ -87,7 +89,7 @@ This is required to [collect debug data](/admin/pprof).
87
89
The docker run command for single-container Sourcegraph needs an additional publish flag to expose the debug port:
If Sourcegraph is deployed to a remote server, then access via an SSH tunnel using a tool
@@ -105,7 +107,7 @@ Add the following to your docker run command:
105
107
```sh
106
108
$ docker run [...]
107
109
-e (YOUR CODE)
108
-
sourcegraph/server:5.6.2535
110
+
sourcegraph/server:{CURRENT_VERSION_NO_V}
109
111
```
110
112
111
113
## Operation
@@ -254,7 +256,7 @@ Sourcegraph can be **tested** on Windows 10 using roughly the same steps provide
254
256
1.[Install Docker for Windows](https://docs.docker.com/docker-for-windows/install/)
255
257
2. Using a command prompt, follow the same [installation steps provided above](#install-sourcegraph-with-docker) but remove the `--volume` arguments. For example by pasting this:
0 commit comments