thebrumby / HotWalletClaimer

Looking to optimize HOT earnings on Near Protocol, Wave on SUI, Vertus on TON, or other supported apps like Hamster Kombat? This Python script monitors and claims rewards for your favorite Telegram crypto games. It avoids API injections by simulating mouse movements in a real browser.
MIT License
160 stars 47 forks source link

Proposal: create docker setup #11

Closed doubleTroub1e closed 4 months ago

doubleTroub1e commented 4 months ago

Hey, it would be really great to add some Dockerfile and make startup process much more easier, so that it could be started with a single command

thebrumby commented 4 months ago

Hi DoubleTrouble,

I never set up a Docker container before, but it seems plausible. And you're right, it would solve the dependency issues. Let me take a further look into that :)

thebrumby commented 4 months ago

Hey DoubleTrouble,

I never really used Docker before, but it seems pretty cool. Can any Docker users following this thread help test it, please?

https://github.com/thebrumby/HotWalletClaimer/blob/main/DOCKER.md

Thanks

doubleTroub1e commented 4 months ago

Hi @thebrumby, sorry for the late reply, If still valid (as I see you've removed it) we can check on this. my proposal is to create some PR and work there, what would be nice to have: 1) Dockerfile itself and docker-compose file so make it easy to edit start options; 2) manual on how to start it, probably session login would be as first step and then some step to start mining coins not sure if it is possible to run all tappers from single telegram session, but if possible then it is super cool and we can do like this: "docker run ..... -e Vertus=true -e wave=true .... " so that default is false, but in case you would like to mine more coins - then just set to true and start it.

thebrumby commented 4 months ago

That's my bad with the document - I moved it! There is a second attempt at a Docker image about ready to go out (maybe tomorrow), but the initial commit works OK as a starting point. Key points are:

As I mentioned before, I never used Docker before, so maybe I'm not doing it the most efficient way. But so far is working well, and the new version will support both ARM64 and AMD64 and has some nice updates from version 1.01 on the docs.

I'll also tag version 1.1 as the latest too, so we will have a history and also easy to get the latest version. Any more comments are very welcome.

https://github.com/thebrumby/HotWalletClaimer/blob/main/docs/DOCKER.md

thebrumby commented 4 months ago

For now, it's built on top of Ubuntu which makes it a big file, however, it turned out to the the easiest way so far of fulfilling all the dependencies. No doubt over time, I'll work out how to build it on some slim version, maybe even before the next version goes out.

doubleTroub1e commented 4 months ago

you can try buidling it on top of python image, like this:

# Use a slim base image
FROM python:3.9-slim-buster

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive

# Install dependencies
RUN apt-get update && apt-get install -y \
    chromium-driver \
    chromium \
    --no-install-recommends && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set the default command to run when starting the container
CMD ["python3"]
thebrumby commented 4 months ago

Thanks, I'll try that when I get a chance. The problem I experienced so far is that Chromium won't install on X86 machines because it needs Snap which doesn't seem to work with Docker build, and Chrome doesn't support ARM64. So, I have it working now with two digests based on the architecture, with slightly different browser setups.

I found even when only building for one architecture with a slim image, it saves 35 MB for the OS but then we need to install Git, Chromedriver, Node Process Manager, and a browser, which puts on another 900 MB anyway, and I'm not sure how we could slim any of those down.

I put version 1.1 up this morning, it's slightly smaller, and has some new helper scripts and restarts the games on updated code if an update gets pushed to GitHub :)

doubleTroub1e commented 4 months ago

will you add Dockerfile to git repo?

doubleTroub1e commented 4 months ago

if you're still looking for new projects which could be automated, you can check: https://t.me/mtkbossbot?start=ref595909481 - this is similar to hamster kombat but new one https://t.me/HexacoinBot/wallet?startapp=595909481 - coins can be changed to real project coins, so pretty promising t.me/Simple_Tap_Bot?start=1716824326795 very new project, started 10th of May, potentially promising

adding all of them to start within same docker image would be really nice

thebrumby commented 4 months ago

Thanks for the suggestion, I'll take a look in my next free time. All new additions are pulled into the container using the PM2 process labeled as "daily-update" :)

I included the current AMD64 Docker File in the documents now: https://github.com/thebrumby/HotWalletClaimer/blob/main/docs/Dockerfile-AMD64.md

doubleTroub1e commented 4 months ago

Hi again, sorry I can't create some branch/PR so that I can push my changes to your repo, I would like to share a bit changed version of dockerfile with you, please find changes in this fork PR https://github.com/thebrumby/HotWalletClaimer/pull/27

built version size is 1.19GB, which could save you some space

thebrumby commented 4 months ago

Thanks for taking the time to contribute some code back to the project. When I get more time in front of the PC I will check out the Docker build and the suggested games.

thebrumby commented 4 months ago

if you're still looking for new projects which could be automated, you can check: https://t.me/mtkbossbot?start=ref595909481 - this is similar to hamster kombat but new one https://t.me/HexacoinBot/wallet?startapp=595909481 - coins can be changed to real project coins, so pretty promising t.me/Simple_Tap_Bot?start=1716824326795 very new project, started 10th of May, potentially promising

adding all of them to start within same docker image would be really nice

Hi DoubleTrouble,

Just to let you know, we have added Haxacore/Hexacoin to the repository, and it seems to be working well in our various test environments.

./launch.sh hexacore

Thanks.