From 5a1e8093f2fc5e48b23139b8e5fed1cc474a720c Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Sat, 22 Jul 2017 03:39:01 -0400 Subject: [PATCH 1/2] clean up installation doc and fix markup errors --- docs/installation.md | 63 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index e12de2bad1..1cbae5a2e6 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -11,7 +11,7 @@ - [pip](https://pip.pypa.io/en/stable/installing/) - [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) (Recommended) -- [hashing key](http://hashing.pogodev.org) - if you want use latest API, not the old, 0.45 +- [hashing key](http://hashing.pogodev.org) - Hashing key now required for bot operation ### Easy installation 1. Clone the git: `git clone https://github.com/PokemonGoF/PokemonGo-Bot` @@ -27,13 +27,13 @@ This will reset and makes sure you have no changes made to any code since it will overide it 3. Rerun the bot `./run.sh` -for manual installation please refer to [here](https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/docs/manual_installation.md) +For manual installation please refer to [here](https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/docs/manual_installation.md) # Windows We do recommend Windows users to use [Docker](#docker) this will work much easier and smoother (also safer) ## Requirements -- [hashing key](http://hashing.pogodev.org) - if you want use latest API, not the old, 0.45 +- [hashing key](http://hashing.pogodev.org) - Hashing key now required for bot operation ### Easy Installation 1. Download [PokemonGo-Bot-Install.bat](https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/windows_bat/PokemonGo-Bot-Install.bat) @@ -55,66 +55,67 @@ Start by downloading for your platform: - [Windows](https://www.docker.com/products/docker#/windows) - [Linux](https://www.docker.com/products/docker#/linux) -Once you have Docker installed, simply create the various config files for your different accounts (e.g. `configs/config.json`, `configs/userdata.js`) and then create a Docker image for PokemonGo-Bot using the Dockerfile in this repo. +- Once you have Docker installed, simply create the various config files for your different accounts (e.g. `configs/config.json`, `configs/userdata.js`) and then create a Docker image for PokemonGo-Bot using the Dockerfile in this repo. ``` cd PokemonGo-Bot docker build -t pokemongo-bot . ``` -By default our Dockerfile ensures that the "master" branch will be used for building the docker container, if you want to use the "dev" branch then you should build the container with below build command: +- By default our Dockerfile ensures that the "master" branch will be used for building the docker container, if you want to use the "dev" branch then you should build the container with below build command: ``` docker build --build-arg BUILD_BRANCH=dev -t pokemongo-bot . ``` - - -After build process you can verify that the image was created with: +- After build process you can verify that the image was created with: ``` docker images ``` -To run the bot container with the PokemonGo-Bot Docker image you've created: +- To run the bot container with the PokemonGo-Bot Docker image you've created: ``` docker run --name=bot1-pokego --rm -it -v $(pwd)/configs/config.json:/usr/src/app/configs/config.json pokemongo-bot ``` -Optionally you can set your timezone with the -e option (default is Etc/UTC). You can find an exhaustive list of timezone here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones +- Optionally you can set your timezone with the -e option (default is Etc/UTC). You can find an exhaustive list of timezone here: [https://en.wikipedia.org/wiki/List_of_tz_database_time_zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). ``` docker run --name=bot1-pokego --rm -it -e TZ=Asia/Taipei -v $(pwd)/configs/config.json:/usr/src/app/configs/config.json pokemongo-bot ``` ->In the case you configured authentification to be handled by auth.json file make sure you mount that file as a volume also +- In the case you configured authentication to be handled by auth.json file make sure you mount that file as a volume also. ->``` +``` docker run --name=bot1-pokego --rm -it -v $(pwd)/configs/auth.json:/usr/src/app/configs/auth.json -v $(pwd)/configs/config.json:/usr/src/app/configs/config.json -v $(pwd)/web/:/usr/src/app/web/ pokemongo-bot ``` ->or for a simplified version mount your whole configs/ subdir to /usr/src/app/configs +- For a simplified version mount your whole configs/ subdir to /usr/src/app/configs. ->``` +``` docker run --name=bot1-pokego --rm -it -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web/:/usr/src/app/web/ pokemongo-bot ``` -> -Run a second container provided with the OpenPoGoBotWeb view: +- Run a second container provided with the OpenPoGoBotWeb view: ``` docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:8000 -v $(pwd)/configs/userdata.js:/usr/src/app/web/config/userdata.js -w /usr/src/app/web python:2.7 python -m SimpleHTTPServer ``` -The OpenPoGoWeb will be served on `http://:8000` + +- The OpenPoGoWeb will be served on `http://:8000` ### Using proxy with docker: - https proxy - ``` + +``` docker run --name=bot1-pokego -e "https_proxy=https://PROXY_IP:PORT" --rm -it -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web/:/usr/src/app/web/ pokemongocc-bot ``` -- http proxy + +* http proxy + ``` docker run --name=bot1-pokego -e "http_proxy=http://PROXY_IP:PORT" --rm -it -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web/:/usr/src/app/web/ pokemongo-bot ``` @@ -139,14 +140,14 @@ docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:800 - Retrieve your host address: ``` - docker-machine ip default +docker-machine ip default ``` -Then, with your containers running and your host address, you can access the web view in your browser: +- Then, with your containers running and your host address, you can access the web view in your browser: + +`http://:8000` (e.g. http://192.168.99.100:8000) -`http://:8000 (eg http://192.168.99.100:8000)` -``` #### Errors - An error occurred trying to connect: @@ -164,28 +165,26 @@ Make sure that the name of the image is correct. ### Using Docker compose -if docker-compose [installed](https://docs.docker.com/compose/install/) you can alternatively run the PokemonGo-Bot ecosystem with one simple command: +- If docker-compose [installed](https://docs.docker.com/compose/install/) you can alternatively run the PokemonGo-Bot ecosystem with one simple command: (by using the docker-compose.yml configuration in this repo) ``` docker-compose up ``` -An example of routing the bot's traffic through a tor proxy can be found within the docker-compose_tor.yml file. To use a different file, supply the file name to docker-compose. The d flag is used to run this in detached mode as the tor logs overwhelm any bot logs you might wish to view. The bot logs can still be seen through `docker logs` command. +- An example of routing the bot's traffic through a tor proxy can be found within the docker-compose_tor.yml file. To use a different file, supply the file name to docker-compose. The d flag is used to run this in detached mode as the tor logs overwhelm any bot logs you might wish to view. The bot logs can still be seen through `docker logs` command. ``` docker-compose -f docker-compose_tor.yml up -d ``` -Also run one single service from the compose configuration is possible: +- Also run one single service from the compose configuration is possible: ``` docker-compose run --rm bot1-pokego ``` - - -command to stop and remove all stopped containers: `docker-compose down` +- command to stop and remove all stopped containers: `docker-compose down` TODO: Add infos / configuration for running multiple bot instances. @@ -193,8 +192,10 @@ Do not push your image to a registry with your config.json and account details i ### Bug reporting when using docker: -Please include output of below command: +* Please include output of below command: + ``` docker inspect --format='{{.Created}} {{.ContainerConfig.Labels}}' container_tag_or_id ``` -container_tag_or_id being the final tag_id of container or the id of the intermediary layer at which the docker build failed. + +`container_tag_or_id` being the final tag_id of container or the id of the intermediary layer at which the docker build failed. \ No newline at end of file From 06d19222abcd4e084aa3e1db9f3b6310789f4938 Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Sat, 22 Jul 2017 03:45:49 -0400 Subject: [PATCH 2/2] fixed a spot in document --- docs/installation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 1cbae5a2e6..31bae0c444 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -51,10 +51,12 @@ This will check for an update and will start the bot afterwards. ### Easy installation Start by downloading for your platform: + - [Mac](https://www.docker.com/products/docker#/mac) - [Windows](https://www.docker.com/products/docker#/windows) - [Linux](https://www.docker.com/products/docker#/linux) + - Once you have Docker installed, simply create the various config files for your different accounts (e.g. `configs/config.json`, `configs/userdata.js`) and then create a Docker image for PokemonGo-Bot using the Dockerfile in this repo. ```