aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-02-25 21:05:40 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-02-25 21:05:44 +0100
commitf38fbd5b58701e9c948c3a82e5598ab366d534b3 (patch)
tree422b0438c58f3e66e5bc2f68db59013a755c1d1d
parentdocker: rename schedule.sh to run_cron.sh (diff)
downloadcgitize-f38fbd5b58701e9c948c3a82e5598ab366d534b3.tar.gz
cgitize-f38fbd5b58701e9c948c3a82e5598ab366d534b3.zip
docker: add run.sh
-rw-r--r--docker/Dockerfile3
-rwxr-xr-xdocker/run.sh6
2 files changed, 8 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 7e15042..b751ca7 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -22,6 +22,7 @@ ENV SSH_AUTH_SOCK "$ssh_sock_path"
COPY ["docker/entrypoint.sh", "/"]
COPY ["docker/get_output_dir.py", "/"]
+COPY ["docker/run.sh", "/"]
COPY ["docker/run_cron.sh", "/"]
COPY ["cgitize/", "/usr/src/cgitize/"]
@@ -29,4 +30,4 @@ ENV SCHEDULE_ON_START=1
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
WORKDIR /usr/src
-CMD ["python3", "-m", "cgitize.main"]
+CMD ["/run.sh"]
diff --git a/docker/run.sh b/docker/run.sh
new file mode 100755
index 0000000..6fb7ee3
--- /dev/null
+++ b/docker/run.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -o errexit -o nounset -o pipefail
+
+cd /usr/src
+exec python3 -m cgitize.main "$@"