Giter VIP home page Giter VIP logo

mfbotdocker's Introduction

MFBotDocker

Docker ready installation for MFBot and Web interface.

Instructions.

Prepare Acc.ini file on MFBot's Windows version. Go to the Settings > Network > Remote Access. Enable remote access - set IP to 127.0.0.1 and choose suitable port number, in my case it's 6969.

  1. Clone repo

git clone https://github.com/mangunowsky/MFBotDocker.git

  1. Paste Acc.ini file into main repo folder

  2. Build Docker image

docker build -t mfbot -f Dockerfile .

  1. Run Docker container

docker run -p 8050:8050 -dit mfbot

  1. Get containers IP address

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container ID>

  1. Open web interface in you browser. User and password is "admin" by default.

http://<container IP>:8050

  1. Happy boting!

Changing web interface listening port.

To change port on which web interface is listeing you need to edit globalVariables.py file located in Web/Functions/

ADRESS = 'http://127.0.0.1:6969/' - change port to one set in Remote Access settings

serverPort = 8050 - Web interface will be available at this port

mfbotdocker's People

Contributors

mangunowsky avatar

Stargazers

 avatar

Watchers

 avatar

mfbotdocker's Issues

CANT MAKE IT WORK ON UBUNTU

I am trying to set up the bot on my ubuntu server but there is no way for it. Can I get any help? Thanks :D

JSONDecodeError

When run and taking a look at the logs with docker logs container ID

Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "MainProgram.py", line 227, in <module>
    initHTML()
  File "MainProgram.py", line 68, in initHTML
    initDetails()
  File "MainProgram.py", line 34, in initDetails
    AccountFun.updateAccs(False)
  File "/mfbot/Web/Functions/AccountFun.py", line 36, in updateAccs
    details = ComUtils.curlGet("?head=1")
  File "/mfbot/Web/Utils/ComUtils.py", line 23, in curlGet
    return json.loads(rString)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.17.0.3:8050/ (Press CTRL+C to quit)

This is what I get. It tells me that it's running, but when I try to access this address, I get a timeout. I have used the port 6969 and default admin accounts for the Acc.ini and changed nothing on the docker setup. The actual bot is running, as I get automatically logged out if I would want to log in manually. I can ping the IP without the port and don't receive a timeout error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.