From f38fbd5b58701e9c948c3a82e5598ab366d534b3 Mon Sep 17 00:00:00 2001
From: Egor Tensin <Egor.Tensin@gmail.com>
Date: Sat, 25 Feb 2023 21:05:40 +0100
Subject: docker: add run.sh

---
 docker/Dockerfile | 3 ++-
 docker/run.sh     | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100755 docker/run.sh

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 "$@"
-- 
cgit v1.2.3