Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker-compose easy provisioning #1588

Closed
wants to merge 4 commits into from

Conversation

ogir-ok
Copy link

@ogir-ok ogir-ok commented Jul 29, 2016

Short Description:
run it with just docker-compose up
Fixes:

  • added little changes to Dockerfile
  • created docker-compose.yml

@maestroi
Copy link
Contributor

don't know docker well but does it run pip as root?
or dus it use env because sometimes i get error on the pgoapi if run without env, it needs root

@ogir-ok
Copy link
Author

ogir-ok commented Jul 29, 2016

When you use docker, you run all stuff from root. As far as it's isolated, virtualenv is not needed.

@maestroi
Copy link
Contributor

@ogir-ok thnx for the clarification, than the change sounds good to me! +1

@@ -3,4 +3,5 @@ FROM python:2.7-onbuild
RUN apt-get update \
&& apt-get install -y python-protobuf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't needed, pip install is enought

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was in initial Dockerfile. So I don't know if I can remove it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove it, I've been removing it from mine during testing. it runs after pip has run and built everything

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to the Dockerfile because Protobuf 3 library is declared as an installation requirement, see Wiki: https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Installation#requirements-click-each-one-for-install-guide

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It works without it.
  2. It's in requirements.txt. Probably error is on some platforms without it's installation.

@joergpatz
Copy link
Contributor

joergpatz commented Jul 29, 2016

Generally I would recommend to run a single process inside the docker container to follow docker's (container) philosophy.

And the great use case of docker-compose is to define the services which should be started -> #1669.

@ogir-ok
Copy link
Author

ogir-ok commented Jul 29, 2016

docker exec -it pokemongobot_bot_1 bash                                                      22:12
root@7ee6ee1c686a:/usr/src/app# ps ax                                                                                                             
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 /bin/bash -c cd /web/; pip install -r requirements.txt; python pokecli.py
   23 ?        S      0:00 python pokecli.py
   73 ?        Ss     0:00 bash
   79 ?        R+     0:00 ps ax

There is just one process

@gregtampa
Copy link
Collaborator

This branch has conflicts that must be resolved

* dev: (43 commits)
  Display Fort Name instead of Fort ID in Log (PokemonGoF#1801)
  add a flag to enable user to choose if he wants to walk to spin forts (PokemonGoF#1772)
  [FIX] use_lucky_egg (PokemonGoF#1774)
  Prevent crash checking session (PokemonGoF#1754)
  * Always report session summary even on crash (PokemonGoF#1759)
  Don't try to release pokemons in forts (PokemonGoF#1751)
  Creating an instance of the workers only on startup (PokemonGoF#1750)
  No longer caching things on the worker. Pulling straight from the bot instance (PokemonGoF#1747)
  fixing wrong import
  Show Pokestop names (PokemonGoF#1671)
  adding a duplicate of SeenFortWorker before MoveToFortWorker
  Improve docker usage; use docker-compose for starting the PokemonGo-Bot ecosystem (PokemonGoF#1669)
  SoftBan Worker (PokemonGoF#1724)
  Huge clean-up: PEP8, sort imports, remove deprecated and unused imports (PokemonGoF#1697)
  Update config.json.pokemon.example (PokemonGoF#1711)
  feat: show xp after catching pokemons (PokemonGoF#1700)
  Revert "Making the SpiralNavigator a worker" (PokemonGoF#1698)
  fixes Polyline class to handle a case in which google is returning only one point (PokemonGoF#1674)
  Making the SpiralNavigator a worker (PokemonGoF#1683)
  Fix transfer worker not triggered for last pokemon (PokemonGoF#1664)
  ...
@ogir-ok
Copy link
Author

ogir-ok commented Jul 30, 2016

Not needed anymore as far as some kind of docker-compose provided in dev

@ogir-ok ogir-ok closed this Jul 30, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this pull request Sep 28, 2016
Change default threads to 1. Slower and accurate results are better than quick and wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants