From 9095bee45c3123b75290a54458f6ea4450b1662a Mon Sep 17 00:00:00 2001 From: idk Date: Fri, 4 Feb 2022 16:48:22 -0500 Subject: [PATCH] Make it possible to run multiple containers on different names/ports using docker. Gonna do some dev builds. --- .gitignore | 1 + DOCKER.md | 1 - Dockerfile.signing | 2 +- docker-newsxml.sh | 2 +- etc/su3.vars | 4 +++- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e073ae0..ffaeb1d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build logs etc/*custom* +build.old \ No newline at end of file diff --git a/DOCKER.md b/DOCKER.md index 3d97b64..748a718 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -44,7 +44,6 @@ docker run -it \ docker cp i2p.newsxml.signing:/opt/i2p.newsxml/build build ``` - ## Now, you're ready to build the hosting container: With the feeds in `build` from the previous step, run: diff --git a/Dockerfile.signing b/Dockerfile.signing index 8cda622..bf86e35 100644 --- a/Dockerfile.signing +++ b/Dockerfile.signing @@ -3,7 +3,7 @@ ENV PATH=/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bi ENV PYTHONPATH=/opt/newsxml ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LC_ALL en_US.UTF-8 RUN apt-get update RUN apt-get install -y python \ python-dev \ diff --git a/docker-newsxml.sh b/docker-newsxml.sh index a19cf6e..c09ecd7 100755 --- a/docker-newsxml.sh +++ b/docker-newsxml.sh @@ -20,7 +20,7 @@ if [ -d "$dir/build" ]; then echo "Removing old newsxml container" docker rm -f newsxml echo "Running newsxml container" - docker run -d --restart=always --name newsxml -p 127.0.0.1:"$SERVEPORT":3000 i2p.newsxml + docker run -d --restart=always --name "$DOCKERNAME" -p 127.0.0.1:"$SERVEPORT":3000 i2p.newsxml else echo "No build directory found. Perform the signing procedure with news.sh or docker-news.sh." exit 1 diff --git a/etc/su3.vars b/etc/su3.vars index 5a7c063..124afc5 100644 --- a/etc/su3.vars +++ b/etc/su3.vars @@ -5,4 +5,6 @@ KS=su3keystore.ks # signer SIGNER=yourname@mail.i2p # port, used for Docker only -SERVEPORT=3000 \ No newline at end of file +SERVEPORT=3000 +# Name to use when serving news in a docker container +DOCKERNAME=newsxml \ No newline at end of file