additional files for docker
This commit is contained in:
parent
88a410a9c0
commit
721ac5e2a3
@ -13,12 +13,7 @@ ADD . /opt/openwebrx
|
|||||||
|
|
||||||
WORKDIR /opt/openwebrx
|
WORKDIR /opt/openwebrx
|
||||||
|
|
||||||
RUN mkdir -p /tmp/openwebrx && \
|
VOLUME /etc/openwebrx
|
||||||
mv "/opt/openwebrx/config_webrx.py" "/opt/openwebrx/config_webrx.py.orig" && \
|
|
||||||
sed 's/temporary_directory = "\/tmp"/temporary_directory = "\/tmp\/openwebrx"/' < "/opt/openwebrx/config_webrx.py.orig" > "/opt/openwebrx/config_webrx.py" && \
|
|
||||||
rm "/opt/openwebrx/config_webrx.py.orig"
|
|
||||||
|
|
||||||
VOLUME /config
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/opt/openwebrx/docker/scripts/run.sh" ]
|
ENTRYPOINT [ "/opt/openwebrx/docker/scripts/run.sh" ]
|
||||||
EXPOSE 8073
|
EXPOSE 8073
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
mkdir -p /etc/openwebrx/
|
||||||
|
mkdir -p /tmp/openwebrx/
|
||||||
if [[ ! -f /etc/openwebrx/config_webrx.py ]] ; then
|
if [[ ! -f /etc/openwebrx/config_webrx.py ]] ; then
|
||||||
mkdir -p /etc/openwebrx/
|
sed 's/temporary_directory = "\/tmp"/temporary_directory = "\/tmp\/openwebrx"/' < "/opt/openwebrx/config_webrx.py" > "/etc/openwebrx/config_webrx.py"
|
||||||
cp config_webrx.py /etc/openwebrx/
|
|
||||||
fi
|
fi
|
||||||
|
if [[ ! -f /etc/openwebrx/bands.json ]] ; then
|
||||||
|
cp bands.json /etc/openwebrx/
|
||||||
|
fi
|
||||||
|
if [[ ! -f /etc/openwebrx/bookmarks.json ]] ; then
|
||||||
|
cp bookmarks.json /etc/openwebrx/
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
_term() {
|
_term() {
|
||||||
echo "Caught signal!"
|
echo "Caught signal!"
|
||||||
kill -TERM "$child" 2>/dev/null
|
kill -TERM "$child" 2>/dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user