Skip to content

Commit

Permalink
Refactoring config to env vars and fixing zombie processes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcleblanc2 committed Feb 23, 2024
1 parent 1a37828 commit 8ffd133
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 187 deletions.
2 changes: 1 addition & 1 deletion config/docker-compose-common-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ networks:
ipam:
driver: default
config:
- subnet: "172.20.0.0/16"
- subnet: "172.20.2.0/27"
6 changes: 3 additions & 3 deletions repo-converter/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ ENV PYTHONDONTWRITEBYTECODE=1
# the application crashes without emitting any logs due to buffering
ENV PYTHONUNBUFFERED=1

# Install python
# Install packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y \
cron \
gcc \
git \
git-svn \
python3 \
python3-dev \
python3-pip \
python3-wheel \
subversion \
Expand All @@ -31,8 +33,6 @@ RUN apt-get update && \
systemctl enable cron && \
systemctl start cron

# python3-dev \
# gcc \

# Download dependencies as a separate step to take advantage of Docker's caching
# Leverage a cache mount to /root/.cache/pip to speed up subsequent builds
Expand Down
2 changes: 1 addition & 1 deletion repo-converter/build/docker-compose-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ 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
command: "-v serve-git -addr :443 /sourcegraph/src-serve-root"
command: "serve-git -addr :443 /sourcegraph/src-serve-root"
6 changes: 4 additions & 2 deletions repo-converter/build/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ services:
- ../../config/toprc:/root/.config/procps/toprc
- ../../src-serve-root/:/sourcegraph/src-serve-root
environment:
- BRIDGE_REPO_CONVERTER_INTERVAL_SECONDS=60
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO
- REPO_CONVERTER_INTERVAL_SECONDS=60
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO
# - REPOS_TO_CONVERT="/sourcegraph/repos-to-convert.yaml" # Path inside the container to find this file, only change to match if the right side of the volume mapping changes
# - SRC_SERVE_ROOT="/sourcegraph/src-serve-root" # Path inside the container to find this directory, only change to match if the right side of the volume mapping changes
1 change: 1 addition & 0 deletions repo-converter/build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
psutil
PyYAML
371 changes: 193 additions & 178 deletions repo-converter/build/run.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion repo-converter/docker-compose-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ 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
command: "-v serve-git -addr :443 /sourcegraph/src-serve-root"
command: "serve-git -addr :443 /sourcegraph/src-serve-root"
2 changes: 1 addition & 1 deletion repo-converter/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ services:
- ../src-serve-root/:/sourcegraph/src-serve-root
restart: always
environment:
- BRIDGE_REPO_CONVERTER_INTERVAL_SECONDS=60
- REPO_CONVERTER_INTERVAL_SECONDS=60
- LOG_LEVEL=DEBUG # DEBUG INFO WARNING ERROR CRITICAL # Default is INFO if unspecified

0 comments on commit 8ffd133

Please sign in to comment.