Docker + Web UI
Hi
I don t understand end of guides for Docker-run.
I have install and run multi bot with docker image.
Bot work.
Now i want run web-api-google but how configure mulit-bot-docker
I have no information in this/sites
tank you
My cmd for run bot
docker build -t pokemongo-bot .
docker run --name=pokego-bot1 --rm -it -v $(pwd)/configs/config-Ptc.json:/usr/src/app/config.json pokemongo-bot
docker run --name=pokego-bot2 --rm -it -v $(pwd)/configs/config-Google.json:/usr/src/app/config.json pokemongo-bot
This is chinesse for me i m french and no dev-
Share web folder with host:
docker run -it -v $(pwd)/web/:/usr/src/app/web --rm --name=pgo-bot-acct1 pokemongo-bot --config config.json TODO: Add configuration for running multiple Docker containers from the same image for every bot instance, and a single container for the web UI.
Salut, French DevOps here :)
If you're not familiar with docker, it's actually not docker way to run multiple apps inside one container.
Sharing the web folder with volume is the best way to share file between containers.
So you're going to need one container by bot and another for webUI. Try to see Docker Compose, it's maybe an alternative to your issue.
Actually what you need is:
$ docker run -d --name=pkm-bot1 -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web:/usr/src/app/web pokemon-bot -cf configs/config1.json
$ docker run -d --name=pkm-bot2 -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web:/usr/src/app/web pokemon-bot -cf configs/config2.json
$ docker run -d -v $(pwd)/web:/usr/share/nginx/html -p 8080:80 nginx
Tank you
but dont have nginx in my mac-os but no possible to run with ## python -m SimpleHTTPServer
tank you
and config1 and config2 is a userdata.js in /bot/web/ folder ?
Hum... Docker is really powerfull because you don't need to install anything. So you don't need to install nginx to run nginx container.
The config1 and config2 are your pokecli configs that are stored inside configs/.
The userdate.js should be inside your $(pwd)/web.
Je suis confus et perdu avec vos linges de codes, j obtiens docker: Error parsing reference: "/Users/mica/Documents/Bot/PokemonGo-Bot/web:/usr/local/var/www/html" is not a valid repository/tag.
My bad ! I've forgot the -v option...
$ docker run -d -v $(pwd)/web:/usr/share/nginx/html -p 8080:80 nginx
for docker you need to redirect the webserver poort and need to add to start it.
I m follow guides in wiki.
Lunik I have run cmd but no work :
docker run -d -v $(pwd)/web:/usr/share/nginx/html nginx
011637bffc329629772cca23545de511bbdea2a95b20cb16454a755342240b68
this line is for me in guides i think docker run -it -v $(pwd)/web/:/usr/src/app/web --rm --name=pgo-bot-acct1 pokemongo-bot --config config.json
for docker you also need to specifi the poort and port to redirect to
@maestroi You're right ! I have the head in the clouds today xD
@lelbo
$ docker run -d -v $(pwd)/web:/usr/share/nginx/html -p 8080:80 nginx
$ go to http://localhost:8080
OK, i have a map now but no marker i m go view here is problem
tank you
check the maps logs with
$ docker logs <container-id>
http://pastebin.com/xSd9jQ2j
Hum, did you specify an user into web/userdata.js ?
// MUST CONFIGURE THE USER ARRAY AND GOOGLE MAPS API KEY. // YOU CAN GET A KEY HERE: https://developers.google.com/maps/documentation/javascript/get-api-key var userInfo = { users: ["[email protected]"], userZoom: true, zoom: 16, userFollow: true, gMapsAPIKey: "XXXXXXX" };
Hide your google api please.
and it seems correct...
Hello there, I kinda have the same issue, but I'm on debian and I already have nginx running, but not with docker. So i tried to do: $ docker run -d --name=pkm-bot1 -p 8000:8000 -v $(pwd)/configs:/usr/src/app/configs -v $(pwd)/web:/usr/src/app/web pokemon-bot -cf configs/config1.json and then I declared my location under my nginx conf as usual, but it doesn't work... Any idea ? Thanks a lot!
@lokiiiii for the bot container, the port is useless (-p 8000:8000).
In your nginx config you must specify the root to /home/lokiiiii/pkmbot/web
OK, I changed my approach: I rebuild my images using docker-compose and now I have two containers : 1 for the bot, and 1 for the web. (the web's one has a -p 8000:8000) I can now access to http://my_IP:web_port, but I can only see a listing directory with my userdata.js and 3 xxx-my_gmail_account.json files. Am I doing it wrong ?