mhqb365 / quack-quack-game

Auto lụm trứng Quack Quack game, bạn nào chơi ủng hộ link mình với 😍
https://t.me/quackquack_game_bot?start=6hn8Xrp7DK
15 stars 8 forks source link

Make it more flexible #3

Closed doubleTroub1e closed 2 months ago

doubleTroub1e commented 3 months ago

Hey, you code looks really great, would it be possible to add some dockerfile so that it could be started on any machine? ex: I do have some raspberry pi3 and pi4 which I would like to use for this but getting correct version on node and making it run a bit troublesome. having a docker image which can be easy started would solve a lot issues with dependencies and other

mhqb365 commented 3 months ago

I thinking about that

doubleTroub1e commented 3 months ago

this one would work fine

FROM node:lts-alpine3.20

WORKDIR /app

COPY . .

RUN npm install

CMD [ "node", "quack.js", "2" ]

Also, some docker compose could be used to start:

x-defaults:
  &default-service
  restart: unless-stopped
  stop_signal: SIGINT
  tty: true
  logging:
    driver: "json-file"
    options:
      max-size: 1m

services:
  quack-quack-game:
    <<: *default-service
    image: my-docker-image:tag
    container_name: 'quack-quack-game'
    environment:
      - TOKEN="mytokenhere'
mhqb365 commented 3 months ago

I will try, tks much