Skip to content

Dockerfile #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
201 changes: 201 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -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

11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down