-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring docker compose files for easier execution
- Loading branch information
1 parent
c9be133
commit a9946c0
Showing
11 changed files
with
93 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '2.4' | ||
|
||
services: | ||
|
||
cloud-agent: | ||
container_name: cloud-agent | ||
image: index.docker.io/sourcegraph/src-tunnel-agent:2024-02-15-04-02-110c2ea9 | ||
volumes: | ||
- ../config/cloud-agent-service-account-key.json:/sourcegraph/cloud-agent-service-account-key.json:ro | ||
- ../config/cloud-agent-config.yaml:/sourcegraph/cloud-agent-config.yaml:ro | ||
command: ["-config=/sourcegraph/cloud-agent-config.yaml"] | ||
restart: always | ||
networks: | ||
- sourcegraph | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local | ||
image: index.docker.io/sourcegraph/src-cli:latest | ||
volumes: | ||
- ../src-serve-root/:/sourcegraph/src-serve-root:ro | ||
command: "serve-git -addr :443 /sourcegraph/src-serve-root" | ||
networks: | ||
- sourcegraph | ||
|
||
networks: | ||
sourcegraph: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,4 @@ | ||
version: '2.4' | ||
|
||
services: | ||
|
||
cloud-agent: | ||
container_name: cloud-agent | ||
image: index.docker.io/sourcegraph/src-tunnel-agent:2024-02-05-22-28-333320ee | ||
volumes: | ||
- ../config/cloud-agent-service-account-key.json:/sourcegraph/cloud-agent-service-account-key.json:ro | ||
- ../config/cloud-agent-config.yaml:/sourcegraph/cloud-agent-config.yaml:ro | ||
command: ["-config=/sourcegraph/cloud-agent-config.yaml"] | ||
restart: always | ||
networks: | ||
- sourcegraph | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local | ||
image: index.docker.io/sourcegraph/src-cli:latest | ||
volumes: | ||
- ../src-serve-root/:/sourcegraph/src-serve-root:ro | ||
command: "serve-git -addr :443 /sourcegraph/src-serve-root" | ||
networks: | ||
- sourcegraph | ||
|
||
networks: | ||
sourcegraph: | ||
include: | ||
- path: | ||
- ../config/docker-compose-common-services.yaml | ||
- docker-compose-override.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-wsl.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,4 @@ | ||
version: '2.4' | ||
|
||
services: | ||
|
||
cloud-agent: | ||
container_name: cloud-agent | ||
image: index.docker.io/sourcegraph/src-tunnel-agent:2024-02-15-04-02-110c2ea9 | ||
volumes: | ||
- ../config/cloud-agent-service-account-key.json:/sourcegraph/cloud-agent-service-account-key.json:ro | ||
- ../config/cloud-agent-config.yaml:/sourcegraph/cloud-agent-config.yaml:ro | ||
command: ["-config=/sourcegraph/cloud-agent-config.yaml"] | ||
restart: always | ||
networks: | ||
- sourcegraph | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-wsl.local | ||
image: index.docker.io/sourcegraph/src-cli:latest | ||
volumes: | ||
- ../src-serve-root/:/sourcegraph/src-serve-root:ro | ||
command: "serve-git -addr :443 /sourcegraph/src-serve-root" | ||
networks: | ||
- sourcegraph | ||
|
||
networks: | ||
sourcegraph: | ||
include: | ||
- path: | ||
- ../config/docker-compose-common-services.yaml | ||
- docker-compose-override.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# To be used in a cronjob to always pull and build the latest | ||
# every 10 minutes | ||
# so that the running container is only 10 minutes behind the latest commit in the branch | ||
|
||
# crontab -e | ||
# */10 * * * * bash /sourcegraph/implementation-bridges/host-wsl2-ubuntu/pull-build-start.sh >> /sourcegraph/implementation-bridges/host-wsl2-ubuntu/pull-build-start.log 2>&1 | ||
|
||
repo_build_path="/sourcegraph/implementation-bridges/repo-converter/build" | ||
|
||
git -C $repo_build_path pull | ||
|
||
docker compose -f $repo_build_path/docker-compose.yaml up -d --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
version: '2.4' | ||
|
||
include: | ||
- path: | ||
- ../../config/docker-compose-common-services.yaml | ||
- docker-compose-override.yaml | ||
|
||
services: | ||
|
||
repo-converter: | ||
container_name: repo-converter | ||
image: implementation-bridge-repo-converter:build | ||
build: | ||
context: . | ||
image: sourcegraph/implementation-bridge-repo-converter:build | ||
restart: always | ||
volumes: | ||
- ../../config/repos-to-convert.yaml:/sourcegraph/repos-to-convert.yaml:ro | ||
- ../../config/toprc:/root/.config/procps/toprc | ||
- ../../src-serve-root/:/sourcegraph/src-serve-root | ||
environment: | ||
- BRIDGE_REPO_CONVERTER_INTERVAL_SECONDS=10 | ||
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO | ||
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
|
||
src-serve-git: | ||
# Uses a valid hostname as container_name, to trick the cloud agent and code host config into finding this container on the Docker network | ||
container_name: src-serve-git-ubuntu.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters