mirror of
https://github.com/basicswap/basicswap.git
synced 2025-01-09 04:09:35 +00:00
doge: docker/production/*
This commit is contained in:
parent
f5db8cf7ce
commit
56f96291e4
3 changed files with 52 additions and 0 deletions
16
docker/production/compose-fragments/1_dogecoin.yml
Normal file
16
docker/production/compose-fragments/1_dogecoin.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
dogecoin_core:
|
||||
image: i_dogecoin
|
||||
build:
|
||||
context: dogecoin
|
||||
dockerfile: Dockerfile
|
||||
container_name: dogecoin_core
|
||||
volumes:
|
||||
- ${DATA_PATH}/dogecoin:/data
|
||||
expose:
|
||||
- ${DOGE_RPC_PORT}
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
restart: unless-stopped
|
25
docker/production/dogecoin/Dockerfile
Normal file
25
docker/production/dogecoin/Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
FROM i_swapclient as install_stage
|
||||
|
||||
RUN basicswap-prepare --preparebinonly --bindir=/coin_bin --withcoin=dogecoin --withoutcoin=particl && \
|
||||
find /coin_bin -name *.tar.gz -delete
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
COPY --from=install_stage /coin_bin .
|
||||
|
||||
ENV DOGECOIN_DATA /data
|
||||
|
||||
RUN groupadd -r dogecoin && useradd -r -m -g dogecoin dogecoin \
|
||||
&& apt-get update \
|
||||
&& apt-get install -qq --no-install-recommends gosu \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir "$DOGECOIN_DATA" \
|
||||
&& chown -R dogecoin:dogecoin "$DOGECOIN_DATA" \
|
||||
&& ln -sfn "$DOGECOIN_DATA" /home/dogecoin/.dogecoin \
|
||||
&& chown -h dogecoin:dogecoin /home/dogecoin/.dogecoin
|
||||
VOLUME /data
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
EXPOSE 8332 8333 18332 18333 18443 18444
|
||||
CMD ["/dogecoin/dogecoind", "--datadir=/data"]
|
11
docker/production/dogecoin/entrypoint.sh
Executable file
11
docker/production/dogecoin/entrypoint.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "$1" == "dogecoin-cli" || "$1" == "dogecoin-tx" || "$1" == "dogecoind" || "$1" == "test_dogecoin" ]]; then
|
||||
mkdir -p "$DOGECOIN_DATA"
|
||||
|
||||
chown -h dogecoin:dogecoin /home/dogecoin/.dogecoin
|
||||
exec gosu dogecoin "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
Loading…
Reference in a new issue