From e27ae8df869b1b88646b69e8787f3069f3fa14b4 Mon Sep 17 00:00:00 2001
From: David Schmitz <schmitz@lrz.de>
Date: Tue, 15 Mar 2022 16:12:03 +0000
Subject: [PATCH] add Dockerfile.debian.supervisord; fix install-debian.sh

---
 Dockerfiles.d/Dockerfile.debian.supervisord | 29 +++++++++++++++++++++
 install-debian.sh                           |  6 +++++
 2 files changed, 35 insertions(+)
 create mode 100644 Dockerfiles.d/Dockerfile.debian.supervisord

diff --git a/Dockerfiles.d/Dockerfile.debian.supervisord b/Dockerfiles.d/Dockerfile.debian.supervisord
new file mode 100644
index 00000000..80d2dd2a
--- /dev/null
+++ b/Dockerfiles.d/Dockerfile.debian.supervisord
@@ -0,0 +1,29 @@
+FROM debian:buster
+
+ENV LC_ALL en_US.utf8
+
+RUN apt-get update
+RUN echo "Set up container's locales"
+RUN echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US"\n' > /etc/default/locale
+RUN echo "en_US.utf8 UTF-8" >> /etc/locale.gen
+RUN apt-get -qqy install locales
+
+RUN id fod || useradd -m fod
+
+RUN mkdir -p /var/log/fod /srv
+COPY . /srv/flowspy
+
+RUN apt-get -qqy install patch
+RUN (cd /srv/flowspy/flowspy && cp -f settings.py.dist settings.py && patch settings.py < settings.py.patch && touch settings_local.py;)
+
+RUN (cd /srv/flowspy; bash ./install-debian.sh;)
+
+EXPOSE 8000
+
+WORKDIR /srv/flowspy
+
+RUN apt-get -qqy install supervisor
+
+#CMD [ "/srv/flowspy/runfod.sh" ]
+CMD [ "/srv/flowspy/runfod-supervisord.sh" ]
+
diff --git a/install-debian.sh b/install-debian.sh
index 4b2624d0..30f089aa 100755
--- a/install-debian.sh
+++ b/install-debian.sh
@@ -170,6 +170,12 @@ else
 		  sed -i "s#/srv/flowspy#$fod_dir#" "settings.py"
 		fi
 	)
+
+	if [ "$install_basesw" = 1 ]; then #are we running in --both mode, i.e. for the venv init is run for the first time, i.e. the problematic package having issues with to new setuptools is not yet installed?
+          # fix
+          pip install setuptools==57.5.0
+	fi
+
 	pip install -r requirements.txt
 
         if [ ! -e "flowspy/settings_local.py" ]; then
-- 
GitLab