From e484faa73d717e6aae1bef830ab282cf0bff7fbb Mon Sep 17 00:00:00 2001 From: DracoMilesX Date: Tue, 30 Aug 2016 11:52:53 +0200 Subject: [PATCH 1/5] Create Dockerfile --- Dockerfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a61bc91 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,44 @@ +FROM ubuntu:latest +MAINTAINER Draco Miles X +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qq mysql-server mysql-client -y && apt-get upgrade -y && apt-get dist-upgrade -y +RUN apt-get install -y \ + apt-utils \ + nano \ + build-essential \ + curl \ + lsb-release \ + openssl \ + libssl-dev \ + openssh-server \ + openssh-client \ + sudo \ + python \ + python-dev \ + python-pip \ + python3 \ + python3-dev \ + python3-pip \ + pkg-config \ + autoconf \ + automake \ + libtool \ + curl \ + make \ + g++ \ + unzip \ + supervisor +RUN mkdir -p /var/run/sshd /var/log/supervisor +RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - +RUN apt-get install -y \ + nodejs \ + git +RUN git clone --recursive https://github.com/google/protobuf.git +RUN cd /protobuf && ./autogen.sh && ./configure && make && make check && make install && ldconfig +RUN cd / +RUN git clone --recursive https://github.com/maierfelix/POGOserver.git +RUN chmod +x /POGOserver/run-linux.sh +COPY cfg.js /POGOserver/ +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf +RUN service mysql start && mysql -u root -e "create database pogosql"; +EXPOSE 22 80 443 3306 3000 +CMD ["/usr/bin/supervisord"] From a657298721e4ffb5f940933dd7732b0e28ecb05a Mon Sep 17 00:00:00 2001 From: DracoMilesX Date: Tue, 30 Aug 2016 11:53:17 +0200 Subject: [PATCH 2/5] Create supervisord.conf --- supervisord.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 supervisord.conf diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 0000000..5eb3271 --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,10 @@ +[supervisord] +nodaemon=true + +[program:sshd] +command=/usr/sbin/sshd -D +autorestart=true + +[program:mysql] +command=/usr/bin/pidproxy /var/run/mysqld/mysqld.pid /usr/sbin/mysqld +autorestart=true From a7c01a382e113afa6c9dba9e206607b35a7198b4 Mon Sep 17 00:00:00 2001 From: DracoMilesX Date: Tue, 30 Aug 2016 11:53:32 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b47a994..231101f 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,15 @@ The required database tables get generated automatically. You need at minimum [Node.js](https://nodejs.org/en/) version 6.x. Depending on your OS, you need to run either ``run-linux.sh`` or ``run-windows.bat`` from the root folder. + +## Docker setup + +1. Download ``cfg.js.example`` and ``supervisord.conf`` from github. +2. Place the ``Dockerfile``, ``cfg.js.example`` and ``supervisord.conf`` in the same folder. Rename ``cfg.js.example`` to ``cfg.js`` +3. Modify the ``cfg.js`` to your likings and don't forget add your credentials and possible to your own gmaps api. (DO NOT CHANGE THE PORT. IF YOU DO YOU NEED TO CHANGE IT IN THE Dockerfile ASWELL.) +4. Create a container and run it. +5. Open a bash prompt and use ``cd /POGOserver/`` and then run ``./run-linux.sh`` +6. Connect your PoGo app with the server +7. Enjoy:) + +NOTE: Instead of automatically mapping the ports map them static so they don't change after reboots. From e19bb264bf712f8ceb6310410b3e723c34bf81dc Mon Sep 17 00:00:00 2001 From: DracoMilesX Date: Tue, 30 Aug 2016 12:18:46 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 231101f..8bc4da1 100644 --- a/README.md +++ b/README.md @@ -61,12 +61,12 @@ Depending on your OS, you need to run either ``run-linux.sh`` or ``run-windows.b ## Docker setup -1. Download ``cfg.js.example`` and ``supervisord.conf`` from github. -2. Place the ``Dockerfile``, ``cfg.js.example`` and ``supervisord.conf`` in the same folder. Rename ``cfg.js.example`` to ``cfg.js`` -3. Modify the ``cfg.js`` to your likings and don't forget add your credentials and possible to your own gmaps api. (DO NOT CHANGE THE PORT. IF YOU DO YOU NEED TO CHANGE IT IN THE Dockerfile ASWELL.) +1. Download ``Dockerfile,``, ``cfg.js.example`` and ``supervisord.conf`` from github. +2. Place ``Dockerfile``, ``cfg.js.example`` and ``supervisord.conf`` into the same folder. Rename ``cfg.js.example`` to ``cfg.js``. +3. Modify ``cfg.js`` to your requirements as described above. 4. Create a container and run it. -5. Open a bash prompt and use ``cd /POGOserver/`` and then run ``./run-linux.sh`` -6. Connect your PoGo app with the server -7. Enjoy:) +5. Open a bash prompt, enter: ``cd /POGOserver/`` and ``./run-linux.sh``. +6. Connect the Pokemon Go app to the server. +7. Done. -NOTE: Instead of automatically mapping the ports map them static so they don't change after reboots. +Note: Instead of automatically mapping the ports, map them static, so they don't change after reboot. From 25498f13a6940d6063edf5a2c67f7599a0bea14f Mon Sep 17 00:00:00 2001 From: DracoMilesX Date: Tue, 30 Aug 2016 12:19:51 +0200 Subject: [PATCH 5/5] Removed the , that was in the ``Dockerfile`` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bc4da1..d63e980 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ Depending on your OS, you need to run either ``run-linux.sh`` or ``run-windows.b ## Docker setup -1. Download ``Dockerfile,``, ``cfg.js.example`` and ``supervisord.conf`` from github. +1. Download ``Dockerfile``, ``cfg.js.example`` and ``supervisord.conf`` from github. 2. Place ``Dockerfile``, ``cfg.js.example`` and ``supervisord.conf`` into the same folder. Rename ``cfg.js.example`` to ``cfg.js``. 3. Modify ``cfg.js`` to your requirements as described above. 4. Create a container and run it.