From f81c96085dfff648cc7ff76bd318fd72f90cc1d8 Mon Sep 17 00:00:00 2001 From: Alessandro Maggio Date: Thu, 18 Nov 2021 15:14:33 +0100 Subject: [PATCH] update README.md with docker run command. Update Dockerfile (ADD ./TwitchChannelPointsMiner) --- .github/workflows/deploy-docker.yml | 2 +- Dockerfile | 7 ++++--- README.md | 19 +++++++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-docker.yml b/.github/workflows/deploy-docker.yml index a8cdc1f..cfed12c 100644 --- a/.github/workflows/deploy-docker.yml +++ b/.github/workflows/deploy-docker.yml @@ -28,7 +28,7 @@ jobs: context: . push: true tags: | - tkdalex/twitch-channel-points-miner-v2:latest + tkdalex/twitch-channel-points-miner-v2:latest platforms: linux/amd64,linux/arm64,linux/arm/v7 build-args: BUILDX_QEMU_ENV=true - name: Image digest diff --git a/Dockerfile b/Dockerfile index 350ceb0..ae2c900 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ ARG BUILDX_QEMU_ENV WORKDIR /usr/src/app -COPY ./miner/requirements.txt ./ +COPY ./requirements.txt ./ + RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --fix-missing --no-install-recommends \ gcc \ @@ -25,5 +26,5 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --fix-missing --no-ins && rm -rf /var/lib/apt/lists/* \ && rm -rf /usr/share/doc/* -COPY ./miner . -CMD [ "python", "./main.py" ] \ No newline at end of file +ADD ./TwitchChannelPointsMiner ./TwitchChannelPointsMiner +ENTRYPOINT [ "python", "run.py" ] diff --git a/README.md b/README.md index e19c318..0e513bf 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,7 @@ Install the package via pip, you will find a stable version - maybe a different The following file is mounted : -- main.py : this is your starter script with your configuration +- run.py : this is your starter script with your configuration These folders are mounted : @@ -301,14 +301,14 @@ These folders are mounted : - cookies : to provide login information - logs : to keep logs outside of container -Example using docker-compose: +**Example using docker-compose:** ```yml version: "3.9" services: miner: - image: mrcraftcod/twitch-miner + image: tkdalex/twitch-channel-points-miner-v2 tty: true environment: - TERM=xterm-256color @@ -316,11 +316,22 @@ services: - ./analytics:/usr/src/app/analytics - ./cookies:/usr/src/app/cookies - ./logs:/usr/src/app/logs - - ./main.py:/usr/src/app/main.py:ro + - ./run.py:/usr/src/app/run.py:ro ports: - "5000:5000" ``` +Example with docker run: +```sh +docker run \ + -v $(pwd)/analytics:/usr/src/app/analytics \ + -v $(pwd)/cookies:/usr/src/app/cookies \ + -v $(pwd)/logs:/usr/src/app/logs \ + -v $(pwd)/run.py:/usr/src/app/run.py:ro \ + -p 5000:5000 \ + tkdalex/twitch-channel-points-miner-v2 +``` + ### Limits > Twitch has a limit - you can't watch more than two channels at one time. We take the first two streamers from the list as they have the highest priority.