diff --git a/.dockerignore b/.dockerignore index 0a74ad63a5..982e411032 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,206 @@ docs test typings *Client.py + +.idea +.vscode + +*_Spoiler.txt +*.bmbp +*.apbp +*.apl2ac +*.apm3 +*.apmc +*.apz5 +*.aptloz +*.apemerald +*.pyc +*.pyd +*.sfc +*.z64 +*.n64 +*.nes +*.smc +*.sms +*.gb +*.gbc +*.gba +*.wixobj +*.lck +*.db3 +*multidata +*multisave +*.archipelago +*.apsave +*.BIN +*.puml + +setups +build +bundle/components.wxs +dist +/prof/ +README.html +.vs/ +EnemizerCLI/ +/Players/ +/SNI/ +/sni-*/ +/appimagetool* +/host.yaml +/options.yaml +/config.yaml +/logs/ +_persistent_storage.yaml +mystery_result_*.yaml +*-errors.txt +success.txt +output/ +Output Logs/ +/factorio/ +/Minecraft Forge Server/ +/WebHostLib/static/generated +/freeze_requirements.txt +/Archipelago.zip +/setup.ini +/installdelete.iss +/data/user.kv +/datapackage +/custom_worlds + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so +*.dll + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt +installer.log + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# vim editor +*.swp + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv* +env/ +venv/ +/venv*/ +ENV/ +env.bak/ +venv.bak/ +*.code-workspace +shell.nix + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# Cython intermediates +_speedups.c +_speedups.cpp +_speedups.html + +# minecraft server stuff +jdk*/ +minecraft*/ +minecraft_versions.json +!worlds/minecraft/ + +# pyenv +.python-version + +#undertale stuff +/Undertale/ + +# OS General Files +.DS_Store +.AppleDouble +.LSOverride +Thumbs.db +[Dd]esktop.ini diff --git a/Dockerfile b/Dockerfile index 889857309d..0601b7adec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN if [ "$ARCHITECTURE" = "x86_64" ]; then \ #Archipelago FROM python:3.12-slim AS archipelago ENV VIRTUAL_ENV=/opt/venv -WORKDIR /run +WORKDIR /app COPY . . #install requirements @@ -41,7 +41,7 @@ RUN python -m venv $VIRTUAL_ENV; \ . $VIRTUAL_ENV/bin/activate #hadolint ignore=DL3042 -RUN pip install -r WebHostLib/requirements.txt; \ +RUN pip install -r WebHostLib/requirements.txt gunicorn==23.0.0; \ python ModuleUpdate.py -y RUN cythonize -i _speedups.pyx @@ -63,4 +63,4 @@ RUN if [ "$ARCHITECTURE" = "x86_64" ]; then \ fi; \ rm -rf /tmp/EnemizerCLI -CMD ["python", "WebHost.py"] +ENTRYPOINT [ "python", "WebHost.py" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..afca1722b1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +services: + web: + build: + context: . + command: python WebHost.py + volumes: + - static_volume:/app/WebHostLib + - ./config.yaml:/app/config.yaml + expose: + - 5000 + nginx: + image: nginx:stable-alpine + volumes: + - static_volume:/app/WebHostLib + - ./nginx.conf:/etc/nginx/conf.d/default.conf + ports: + - 7235:80 + depends_on: + - web + +volumes: + static_volume: