mirror of
https://github.com/Retropex/dockerfile-deps.git
synced 2025-05-13 00:40:41 +02:00
Add autostart for joinmarket image
This commit is contained in:
parent
a34a4de0fe
commit
4df8202cbd
6
JoinMarket/0.9.3/autostart
Normal file
6
JoinMarket/0.9.3/autostart
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Remove comments in from of the service you want to automatically restart
|
||||||
|
# when the container restart.
|
||||||
|
|
||||||
|
# ob-watcher
|
||||||
|
# yg-privacyenhanced
|
||||||
|
# yield-generator-basic
|
@ -13,6 +13,23 @@ if ! [ -f "$CONFIG" ]; then
|
|||||||
cp "$DEFAULT_CONFIG" "$CONFIG"
|
cp "$DEFAULT_CONFIG" "$CONFIG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! [ -f "$AUTO_START" ]; then
|
||||||
|
cp "$DEFAULT_AUTO_START" "$AUTO_START"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# auto start services
|
||||||
|
while read p; do
|
||||||
|
[[ "$p" == "" ]] && continue
|
||||||
|
[[ "$p" == "#"* ]] && continue
|
||||||
|
echo "Auto start: $p"
|
||||||
|
file_path="/etc/supervisor/conf.d/$p.conf"
|
||||||
|
if [ -f "$file_path" ]; then
|
||||||
|
sed -i 's/autostart=false/autostart=true/g' $file_path
|
||||||
|
else
|
||||||
|
echo "$file_path not found"
|
||||||
|
fi
|
||||||
|
done <$AUTO_START
|
||||||
|
|
||||||
# For every env variable JM_FOO=BAR, replace the default configuration value of 'foo' by 'bar'
|
# For every env variable JM_FOO=BAR, replace the default configuration value of 'foo' by 'bar'
|
||||||
while IFS='=' read -r -d '' n v; do
|
while IFS='=' read -r -d '' n v; do
|
||||||
n="${n,,}" # lowercase
|
n="${n,,}" # lowercase
|
||||||
|
@ -15,6 +15,8 @@ RUN ./install.sh --disable-secp-check --without-qt
|
|||||||
ENV DATADIR /root/.joinmarket
|
ENV DATADIR /root/.joinmarket
|
||||||
ENV CONFIG ${DATADIR}/joinmarket.cfg
|
ENV CONFIG ${DATADIR}/joinmarket.cfg
|
||||||
ENV DEFAULT_CONFIG /root/default.cfg
|
ENV DEFAULT_CONFIG /root/default.cfg
|
||||||
|
ENV DEFAULT_AUTO_START /root/autostart
|
||||||
|
ENV AUTO_START ${DATADIR}/autostart
|
||||||
ENV ENV_FILE "${DATADIR}/.env"
|
ENV ENV_FILE "${DATADIR}/.env"
|
||||||
RUN . jmvenv/bin/activate && cd /src/scripts && \
|
RUN . jmvenv/bin/activate && cd /src/scripts && \
|
||||||
pip install matplotlib && \
|
pip install matplotlib && \
|
||||||
@ -23,6 +25,7 @@ RUN . jmvenv/bin/activate && cd /src/scripts && \
|
|||||||
WORKDIR /src/scripts
|
WORKDIR /src/scripts
|
||||||
COPY docker-entrypoint.sh .
|
COPY docker-entrypoint.sh .
|
||||||
COPY *.sh ./
|
COPY *.sh ./
|
||||||
|
COPY autostart /root/
|
||||||
COPY supervisor-conf/*.conf /etc/supervisor/conf.d/
|
COPY supervisor-conf/*.conf /etc/supervisor/conf.d/
|
||||||
ENV PATH /src/scripts:$PATH
|
ENV PATH /src/scripts:$PATH
|
||||||
EXPOSE 62601 8080
|
EXPOSE 62601 8080
|
||||||
|
@ -29,6 +29,8 @@ RUN ./install.sh --disable-secp-check --without-qt
|
|||||||
ENV DATADIR /root/.joinmarket
|
ENV DATADIR /root/.joinmarket
|
||||||
ENV CONFIG ${DATADIR}/joinmarket.cfg
|
ENV CONFIG ${DATADIR}/joinmarket.cfg
|
||||||
ENV DEFAULT_CONFIG /root/default.cfg
|
ENV DEFAULT_CONFIG /root/default.cfg
|
||||||
|
ENV DEFAULT_AUTO_START /root/autostart
|
||||||
|
ENV AUTO_START ${DATADIR}/autostart
|
||||||
ENV ENV_FILE "${DATADIR}/.env"
|
ENV ENV_FILE "${DATADIR}/.env"
|
||||||
RUN . jmvenv/bin/activate && cd /src/scripts && \
|
RUN . jmvenv/bin/activate && cd /src/scripts && \
|
||||||
(python wallet-tool.py generate || true) \
|
(python wallet-tool.py generate || true) \
|
||||||
@ -36,6 +38,7 @@ RUN . jmvenv/bin/activate && cd /src/scripts && \
|
|||||||
WORKDIR /src/scripts
|
WORKDIR /src/scripts
|
||||||
COPY docker-entrypoint.sh .
|
COPY docker-entrypoint.sh .
|
||||||
COPY *.sh ./
|
COPY *.sh ./
|
||||||
|
COPY autostart /root/
|
||||||
COPY supervisor-conf/*.conf /etc/supervisor/conf.d/
|
COPY supervisor-conf/*.conf /etc/supervisor/conf.d/
|
||||||
ENV PATH /src/scripts:$PATH
|
ENV PATH /src/scripts:$PATH
|
||||||
EXPOSE 62601 8080
|
EXPOSE 62601 8080
|
||||||
|
@ -20,6 +20,8 @@ ENV DATADIR /root/.joinmarket
|
|||||||
ENV CONFIG ${DATADIR}/joinmarket.cfg
|
ENV CONFIG ${DATADIR}/joinmarket.cfg
|
||||||
ENV DEFAULT_CONFIG /root/default.cfg
|
ENV DEFAULT_CONFIG /root/default.cfg
|
||||||
ENV ENV_FILE "${DATADIR}/.env"
|
ENV ENV_FILE "${DATADIR}/.env"
|
||||||
|
ENV DEFAULT_AUTO_START /root/autostart
|
||||||
|
ENV AUTO_START ${DATADIR}/autostart
|
||||||
RUN . jmvenv/bin/activate && cd /src/scripts && \
|
RUN . jmvenv/bin/activate && cd /src/scripts && \
|
||||||
pip install matplotlib && \
|
pip install matplotlib && \
|
||||||
(python wallet-tool.py generate || true) \
|
(python wallet-tool.py generate || true) \
|
||||||
@ -27,6 +29,7 @@ RUN . jmvenv/bin/activate && cd /src/scripts && \
|
|||||||
WORKDIR /src/scripts
|
WORKDIR /src/scripts
|
||||||
COPY docker-entrypoint.sh .
|
COPY docker-entrypoint.sh .
|
||||||
COPY *.sh ./
|
COPY *.sh ./
|
||||||
|
COPY autostart /root/
|
||||||
COPY supervisor-conf/*.conf /etc/supervisor/conf.d/
|
COPY supervisor-conf/*.conf /etc/supervisor/conf.d/
|
||||||
ENV PATH /src/scripts:$PATH
|
ENV PATH /src/scripts:$PATH
|
||||||
EXPOSE 62601 8080
|
EXPOSE 62601 8080
|
||||||
|
Loading…
Reference in New Issue
Block a user