Skip to content

Commit

Permalink
Merge pull request #88 from alfficcadenti/docker
Browse files Browse the repository at this point in the history
versioning for docker function and bug fix
  • Loading branch information
alfficcadenti authored Dec 3, 2021
2 parents edc731a + 11fdc51 commit 9addcec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ and then

`npm start`

If you face issue related to the browser when you run the bot for the first time, be sure you have installed chromium browser. For Linux:
#### install chromium
sudo apt-get install chromium-browser

#### run this if running chromium still fails
sudo apt-get install libpangocairo-1.0-0 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libgconf2-4 libasound2 libatk1.0-0 libgtk-3-0 libgbm-dev



### Optional variables:

Expand Down Expand Up @@ -84,6 +92,21 @@ You can now run `pm2 list` command to see your bot up and running. It will autom
You can find more information on PM2 usage options at their [official webiste](https://pm2.keymetrics.io/).


### Running the bot in a docker container

docker instructions:

1. first, you need to install docker https://docs.docker.com/get-docker/
2. open your terminal/command line
3. cd into your bot directory
4. build the image
-> `docker build -t your_image_name -f Dockerfile .`
5. then run a container based on the image
-> `docker run -it your_image_name bash`
6. the 5th step will get you inside your container, use nano or vim to edit your .env file and make sure to uncomment CHROME_EXEC
7. finally, run
-> `npm start`



## Local History backup (battlesGetData.js)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "splinterlands-bot",
"version": "1.2.1",
"version": "1.4.0",
"description": "",
"main": "main.js",
"engines": {
Expand Down

0 comments on commit 9addcec

Please sign in to comment.