Skip to content

Commit

Permalink
simplify volume mount and add whitelist to dogecoin.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
xanimo committed Mar 4, 2024
1 parent 243eef4 commit 7fefbd9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
3 changes: 2 additions & 1 deletion 1.14.7/bullseye/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ echo rpcpassword=$rpcpassword >> dogecoin.conf
echo harddustlimit=0.001 >> dogecoin.conf
echo reindex=1 >> dogecoin.conf
echo txindex=1 >> dogecoin.conf
echo prune=2000 >> dogecoin.conf
echo prune=550 >> dogecoin.conf
echo whitelist=127.0.0.1 >> dogecoin.conf
cat dogecoin.conf > .env

docker build --no-cache --build-arg "APP_UID=$(id -u $USER)" --build-arg "APP_GID=$(id -g $USER)" --build-arg "USER=dogecoin" -t xanimo/dogecoin:1.14.7 .
Expand Down
11 changes: 1 addition & 10 deletions 1.14.7/bullseye/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ services:
build: .
image: xanimo/dogecoin:1.14.7
volumes:
- dogecoin:/home/dogecoin/.dogecoin
- /mnt/volumes/core:/home/dogecoin/.dogecoin
env_file:
- .env
command:

volumes:
dogecoin:
driver: local
driver_opts:
o: bind
type: none
device: /mnt/volumes/.dogecoin
4 changes: 1 addition & 3 deletions 1.14.7/bullseye/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def create_datadir():
app_uid = os.environ["APP_UID"]
app_gid = os.environ["APP_GID"]
user = os.environ["USER"]
subprocess.run(["chmod", "-R", "1700", datadir], check=True)
subprocess.run(["chmod", "-R", "1007", datadir], check=True)
subprocess.run(["chown", "-R", f"{app_uid}:{app_gid}", f"/home/{user}/.dogecoin"], check=True)

def convert_env(executable):
Expand Down Expand Up @@ -156,8 +156,6 @@ def main():
if executable not in CLI_EXECUTABLES:
return execute(executable, sys.argv[1:])

create_datadir()

executable_args = convert_env(executable)
executable_args += sys.argv[1:]

Expand Down
4 changes: 2 additions & 2 deletions 1.14.7/bullseye/run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ ! -d /mnt/volumes/.dogecoin ]]; then
mkdir -p /mnt/volumes/.dogecoin
if [[ ! -d /mnt/volumes/core ]]; then
mkdir -p /mnt/volumes/core
fi

if docker inspect dogecoin | grep '"Status":' | grep "running"; then
Expand Down
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

pushd ./1.14.7/bullseye/
docker compose up
./run.sh
popd

0 comments on commit 7fefbd9

Please sign in to comment.