diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9e412d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,201 @@ +**/.* +**/*.md +**/*.bak +**/*.pdf +Dockerfile* +radiance* +tests +data +docs +tags + +**/core + +# Byte-compiled / optimized / DLL files +**/__pycache__/ +**/*.py[cod] +**/*$py.class + +# C extensions +**/*.so + +# Distribution / packaging +**/.Python +**/build/ +**/develop-eggs/ +**/dist/ +**/downloads/ +**/eggs/ +**/.eggs/ +**/lib/ +**/lib64/ +**/parts/ +**/sdist/ +**/var/ +**/wheels/ +**/pip-wheel-metadata/ +**/share/python-wheels/ +**/*.egg-info/ +**/.installed.cfg +**/*.egg +**/MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +**/*.manifest +**/*.spec + +# Installer logs +**/pip-log.txt +**/pip-delete-this-directory.txt + +# Unit test / coverage reports +**/htmlcov/ +**/.tox/ +**/.nox/ +**/.coverage +**/.coverage.* +**/.cache +**/nosetests.xml +**/coverage.xml +**/*.cover +**/*.py,cover +**/.hypothesis/ +**/.pytest_cache/ + +# Translations +**/*.mo +**/*.pot + +# Django stuff: +**/*.log +**/local_settings.py +**/db.sqlite3 +**/db.sqlite3-journal + +# Flask stuff: +**/instance/ +**/.webassets-cache + +# Scrapy stuff: +**/.scrapy + +# Sphinx documentation +**/docs/_build/ + +# PyBuilder +**/target/ + +# Jupyter Notebook +**/.ipynb_checkpoints + +# IPython +**/profile_default/ +**/ipython_config.py + +# pyenv +**/.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +**/__pypackages__/ + +# Celery stuff +**/celerybeat-schedule +**/celerybeat.pid + +# SageMath parsed files +**/*.sage.py + +# Environments +**/.env +**/.venv +**/env/ +**/venv/ +**/ENV/ +**/env.bak/ +**/venv.bak/ + +# Spyder project settings +**/.spyderproject +**/.spyproject + +# Rope project settings +**/.ropeproject + +# mkdocs documentation +**//site + +# mypy +**/.mypy_cache/ +**/.dmypy.json +**/dmypy.json + +# Pyre type checker +**/.pyre/ + +# - # +# C # +# - # +# Copied from https://github.com/github/gitignore/blob/master/C.gitignore + +# Prerequisites +**/*.d + +# Object files +**/*.o +**/*.ko +**/*.obj +**/*.elf + +# Linker output +**/*.ilk +**/*.map +**/*.exp + +# Precompiled Headers +**/*.gch +**/*.pch + +# Libraries +**/*.lib +**/*.a +**/*.la +**/*.lo + +# Shared objects (inc. Windows DLLs) +**/*.dll +**/*.so +**/*.so.* +**/*.dylib + +# Executables +**/*.exe +**/*.out +**/*.app +**/*.i*86 +**/*.x86_64 +**/*.hex + +# Debug files +**/*.dSYM/ +**/*.su +**/*.idb +**/*.pdb + +# Kernel Module Compile Results +**/*.mod* +**/*.cmd +**/.tmp_versions/ +**/modules.order +**/Module.symvers +**/Mkfile.old +**/dkms.conf + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..075dc3a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.9.5-slim + +WORKDIR /app + +COPY requirements.txt requirements.txt + +RUN pip3 install -r requirements.txt + +COPY . . + +CMD [ "gunicorn", "--chdir", "webapp", "-b", "0.0.0.0:8000", "app:app"] \ No newline at end of file diff --git a/README.md b/README.md index ce68cb6..2310ca9 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,14 @@ If you want to test out your changes, you can run the server locally. 4. Navigate to [http://127.0.0.1:8000/](http://127.0.0.1:8000/) +## Using docker for deployment + +1. Make sure you have docker installed. +2. Run +```docker build . -t wordle``` +3. Run +```docker run -d -p 8000:8000 wordle``` + ## TODOs - [ ] take into account browser bar height on mobile - [ ] curate wordlists for existing languages