removed python3 - not needed when running 12-buster-slim

also prep entrypoint even if it was shipped with no execution attrib
and prevent restart loop since pm2-runtime always exits with 0
This commit is contained in:
David Abutbul 2022-01-26 00:44:39 +02:00
parent b791c9e9bb
commit d63db9acc2
3 changed files with 19 additions and 9 deletions

View File

@ -13,7 +13,6 @@ RUN apt-get update \
git \
curl \
build-essential \
python3 \
python \
libssl-dev \
lrzsz \
@ -37,6 +36,7 @@ RUN apt-get update \
# sexyz
COPY docker/bin/sexyz /usr/local/bin
RUN chmod +x /enigma-bbs/docker/bin/docker-entrypoint.sh
# enigma storage mounts
VOLUME /enigma-bbs/art

View File

@ -1,8 +1,13 @@
#!/usr/bin/env bash
prepopvols=("config" "mods" "art")
bbspath=/enigma-bbs
bbsstgp=/enigma-bbs-pre
if [[ ! -f $bbspath/config/config.hjson ]]; then
# Set some vars
prepopvols=("config" "mods" "art") # these are folders which contain runtime needed files, and need to be represented in the host
bbspath=/enigma-bbs # install location
bbsstgp=/enigma-bbs-pre # staging location for prepopvals
configname=config.hjson # this is the default name, this script is intended for easy get-go - make changes as needed
# Setup happens when there is no existing config file
if [[ ! -f $bbspath/config/$configname ]]; then
for dir in "${prepopvols[@]}"
do
if [ -n "$(find "$bbspath/$dir" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
@ -13,4 +18,9 @@ if [[ ! -f $bbspath/config/config.hjson ]]; then
done
./oputil.js config new
fi
if [[ ! -f $bbspath/config/$configname ]]; then #make sure once more, otherwise pm2-runtime will loop if missing the config
echo "for some reason you have skipped configuration - enigma will not work. please run config"
exit 1
else
pm2-runtime main.js
fi

View File

@ -19,7 +19,7 @@ docker run -it --rm -p 8888:8888 \
-v "$(pwd)/art:/enigma-bbs/art" \
-v "$(pwd)/mods:/enigma-bbs/mods" \
-v "$(pwd)/mail:/mail" \
enigmabbs:latest
enigmabbs/enigmabbs:latest
```
- Run it: \
you can use the same command as above, just daemonize and drop interactiveness (we needed it for config but most of the time docker will run in the background)
@ -33,8 +33,8 @@ docker run -d --rm -p 8888:8888 \
-v "$(pwd)/art:/enigma-bbs/art" \
-v "$(pwd)/mods:/enigma-bbs/mods" \
-v "$(pwd)/mail:/mail" \
enigmabbs:latest
```
enigmabbs/enigmabbs:latest
````
:bulb: Configuration will be stored in `$(pwd)/enigma-bbs/config`.