aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-27 09:10:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-27 09:10:44 +0300
commit722acb80f61063a776ca4fb59ed15a12edd6fa07 (patch)
treef552b03107e4ff7f3bb4649eb12842f68c2d6538
parentREADME: update (diff)
downloadcgitize-722acb80f61063a776ca4fb59ed15a12edd6fa07.tar.gz
cgitize-722acb80f61063a776ca4fb59ed15a12edd6fa07.zip
docker: change default paths
-rw-r--r--Dockerfile2
-rw-r--r--README.md16
-rw-r--r--cgitize/config.py2
-rw-r--r--docker-compose.yml2
-rw-r--r--examples/cgitize.toml2
-rw-r--r--test/integration/docker/docker-compose.yml4
6 files changed, 14 insertions, 14 deletions
diff --git a/Dockerfile b/Dockerfile
index 5e6d53a..d540a02 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,7 +17,7 @@ RUN apk add --no-cache bash git openssh-client python3 tini
COPY --from=build ["/tmp/venv", "/tmp/venv/"]
-ARG ssh_sock_dir=/var/run/cgitize
+ARG ssh_sock_dir=/
ARG ssh_sock_path="$ssh_sock_dir/ssh-agent.sock"
ENV SSH_AUTH_SOCK "$ssh_sock_path"
diff --git a/README.md b/README.md
index 5881964..b07c6b1 100644
--- a/README.md
+++ b/README.md
@@ -37,14 +37,14 @@ tokens/application passwords).
The image is **egortensin/cgitize**.
The container reads the config from /etc/cgitize/cgitize.toml and writes the
-repositories to /var/tmp/cgitize.
-If SSH is required, map the socket to /var/run/cgitize/ssh-agent.sock.
-
- docker run -it --rm \
- -v "/path-to/config-dir:/etc/cgitize:ro" \
- -v "$SSH_AUTH_SOCK:/var/run/cgitize/ssh-agent.sock" \
- -v "/path-to/output-dir:/var/tmp/cgitize" \
- egortensin/cgitize:2
+repositories to /mnt/cgitize.
+If SSH is required, map the socket to /ssh-agent.sock.
+
+ docker run -it --rm \
+ -v "/path-to/config-dir:/etc/cgitize:ro" \
+ -v "$SSH_AUTH_SOCK:/ssh-agent.sock" \
+ -v "/path-to/output-dir:/mnt/cgitize" \
+ egortensin/cgitize:master
The container executes cgitize inside a cron job.
The `SCHEDULE` environment variable controls the period between cgitize runs.
diff --git a/cgitize/config.py b/cgitize/config.py
index 3fd8aee..5b5fb32 100644
--- a/cgitize/config.py
+++ b/cgitize/config.py
@@ -37,7 +37,7 @@ class Section:
class MainSection(Section):
- DEFAULT_OUTPUT_DIR = '/var/tmp/cgitize'
+ DEFAULT_OUTPUT_DIR = '/mnt/cgitize'
@property
def output_dir(self):
diff --git a/docker-compose.yml b/docker-compose.yml
index beba3a6..b5df283 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,7 +13,7 @@ services:
restart: unless-stopped
volumes:
- ./examples/docker:/etc/cgitize:ro
- - repositories:/var/tmp/cgitize
+ - repositories:/mnt/cgitize
frontend:
build:
context: ./docker/frontend
diff --git a/examples/cgitize.toml b/examples/cgitize.toml
index 95317b1..fb76589 100644
--- a/examples/cgitize.toml
+++ b/examples/cgitize.toml
@@ -1,6 +1,6 @@
# All settings are optional.
-# /var/tmp/cgitize by default.
+# /mnt/cgitize by default.
output_dir = "/tmp/cgitize"
# URL to clone from the output directory. {repo} is replaced by the
diff --git a/test/integration/docker/docker-compose.yml b/test/integration/docker/docker-compose.yml
index e803515..2ac7dee 100644
--- a/test/integration/docker/docker-compose.yml
+++ b/test/integration/docker/docker-compose.yml
@@ -12,5 +12,5 @@ services:
image: client
volumes:
- ./client/etc/:/etc/cgitize:ro
- - "$SSH_AUTH_SOCK:/var/run/cgitize/ssh-agent.sock"
- - ./client/output:/var/tmp/cgitize
+ - "$SSH_AUTH_SOCK:/ssh-agent.sock"
+ - ./client/output:/mnt/cgitize