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:
parent
b791c9e9bb
commit
d63db9acc2
|
@ -13,7 +13,6 @@ RUN apt-get update \
|
||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
build-essential \
|
build-essential \
|
||||||
python3 \
|
|
||||||
python \
|
python \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
lrzsz \
|
lrzsz \
|
||||||
|
@ -37,6 +36,7 @@ RUN apt-get update \
|
||||||
|
|
||||||
# sexyz
|
# sexyz
|
||||||
COPY docker/bin/sexyz /usr/local/bin
|
COPY docker/bin/sexyz /usr/local/bin
|
||||||
|
RUN chmod +x /enigma-bbs/docker/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
# enigma storage mounts
|
# enigma storage mounts
|
||||||
VOLUME /enigma-bbs/art
|
VOLUME /enigma-bbs/art
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
prepopvols=("config" "mods" "art")
|
|
||||||
bbspath=/enigma-bbs
|
# Set some vars
|
||||||
bbsstgp=/enigma-bbs-pre
|
prepopvols=("config" "mods" "art") # these are folders which contain runtime needed files, and need to be represented in the host
|
||||||
if [[ ! -f $bbspath/config/config.hjson ]]; then
|
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[@]}"
|
for dir in "${prepopvols[@]}"
|
||||||
do
|
do
|
||||||
if [ -n "$(find "$bbspath/$dir" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
|
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
|
done
|
||||||
./oputil.js config new
|
./oputil.js config new
|
||||||
fi
|
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
|
pm2-runtime main.js
|
||||||
|
fi
|
||||||
|
|
|
@ -19,7 +19,7 @@ docker run -it --rm -p 8888:8888 \
|
||||||
-v "$(pwd)/art:/enigma-bbs/art" \
|
-v "$(pwd)/art:/enigma-bbs/art" \
|
||||||
-v "$(pwd)/mods:/enigma-bbs/mods" \
|
-v "$(pwd)/mods:/enigma-bbs/mods" \
|
||||||
-v "$(pwd)/mail:/mail" \
|
-v "$(pwd)/mail:/mail" \
|
||||||
enigmabbs:latest
|
enigmabbs/enigmabbs:latest
|
||||||
```
|
```
|
||||||
- Run it: \
|
- 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)
|
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)/art:/enigma-bbs/art" \
|
||||||
-v "$(pwd)/mods:/enigma-bbs/mods" \
|
-v "$(pwd)/mods:/enigma-bbs/mods" \
|
||||||
-v "$(pwd)/mail:/mail" \
|
-v "$(pwd)/mail:/mail" \
|
||||||
enigmabbs:latest
|
enigmabbs/enigmabbs:latest
|
||||||
```
|
````
|
||||||
|
|
||||||
:bulb: Configuration will be stored in `$(pwd)/enigma-bbs/config`.
|
:bulb: Configuration will be stored in `$(pwd)/enigma-bbs/config`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue