diff --git a/docker/entrypoint.spec b/docker/entrypoint.spec index 4fc699a..5cab860 100644 --- a/docker/entrypoint.spec +++ b/docker/entrypoint.spec @@ -8,12 +8,15 @@ a = Analysis( ['entrypoint.py'], pathex=[], binaries=[], - datas=[], + datas=[ + ('./nxbt/web/static','static'), + ('./nxbt/web/templates','templates')], hiddenimports=[ + 'engineio.async_drivers.eventlet', 'eventlet.hubs.epolls', 'eventlet.hubs.kqueue', 'eventlet.hubs.selects', - 'dns', + 'dns', 'dns.dnssec', 'dns.e164', 'dns.namedict', diff --git a/docker/gnu/Dockerfile b/docker/gnu/Dockerfile index 2008a13..3208b82 100644 --- a/docker/gnu/Dockerfile +++ b/docker/gnu/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /nxbt COPY ./docker ./docker COPY ./nxbt ./docker/nxbt RUN apt update \ - && apt install -y python3 python3-dev python3-pip python3-venv libssl-dev libdbus-glib-1-dev libdbus-1-dev \ + && apt install -y python3 python3-dev python3-pip python3-venv libssl-dev libdbus-glib-1-dev libdbus-1-dev procps\ && python3 -m venv /venv ENV PATH="/venv/bin:$PATH" RUN pip install pyinstaller \ diff --git a/docker/musl/Dockerfile b/docker/musl/Dockerfile index ab8e18f..0f44a2c 100644 --- a/docker/musl/Dockerfile +++ b/docker/musl/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /nxbt COPY ./docker ./docker COPY ./nxbt ./docker/nxbt RUN apk update \ - && apk add python3 python3-dev py3-pip py3-virtualenv py3-dbus dbus-glib-dev make gcc g++ musl-dev libffi-dev openssl-dev \ + && apk add python3 python3-dev py3-pip py3-virtualenv py3-dbus dbus-glib-dev make gcc g++ musl-dev libffi-dev openssl-dev procps\ && python3 -m venv /venv ENV PATH="/venv/bin:$PATH" RUN pip install pyinstaller \ diff --git a/nxbt/web/app.py b/nxbt/web/app.py index 619d6b8..dcc5e43 100644 --- a/nxbt/web/app.py +++ b/nxbt/web/app.py @@ -11,15 +11,15 @@ from flask_socketio import SocketIO, emit import eventlet - -app = Flask(__name__, - static_url_path='', - static_folder='static',) nxbt = Nxbt() if getattr(sys,'frozen',False): path=os.path.dirname(sys.executable) + template_folder = os.path.join(sys._MEIPASS, 'templates') + static_folder = os.path.join(sys._MEIPASS, 'static') + app = Flask(__name__, static_url_path='', template_folder=template_folder, static_folder=static_folder) elif __file__: path=os.path.dirname(__file__) + app = Flask(__name__, static_url_path='') # Configuring/retrieving secret key secrets_path = os.path.join( @@ -163,4 +163,4 @@ def start_web_app(ip='0.0.0.0', port=8000, usessl=False, cert_path=None): if __name__ == "__main__": - start_web_app() + start_web_app() \ No newline at end of file