aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-02-25 22:50:51 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-02-25 22:57:28 +0100
commit36e26346f0d928fa2660c063210e0271f5f5fc2a (patch)
treefa8568b6c3b5b475be6541676b3213727d7dfb78 /docker
parentremove dead code (diff)
downloadcgitize-36e26346f0d928fa2660c063210e0271f5f5fc2a.tar.gz
cgitize-36e26346f0d928fa2660c063210e0271f5f5fc2a.zip
docker: ignore missing config file
It allows doing something like docker run -it --rm egortensin/cgitize:latest sh (without the missing file errors).
Diffstat (limited to '')
-rwxr-xr-xdocker/entrypoint.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 786bcc6..35ef3e3 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -15,8 +15,10 @@ readonly script_dir
readonly cfg_path=/etc/cgitize/cgitize.toml
secure_repo_dir() {
+ [ ! -e "$cfg_path" ] && return 0
+
local dir
- dir="$( /get_output_dir.py -- "$cfg_path" )"
+ dir="$( "$script_dir/get_output_dir.py" -- "$cfg_path" )"
chmod -- o-rwx "$dir"
@@ -26,8 +28,12 @@ secure_repo_dir() {
chown -- :101 "$dir"
}
-main() {
+setup() {
secure_repo_dir
+}
+
+main() {
+ setup
exec "$script_dir/run_cron.sh" "$@"
}