diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..61e0b07 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Pull base image +FROM python:3.10 + +# Set environment varibles +ENV PYTHONDONTWRITEBYTECODE 1 +ENV PYTHONUNBUFFERED 1 + +WORKDIR /code/ + +# Install dependencies +RUN pip install pipenv +COPY Pipfile Pipfile.lock /code/ +RUN pipenv install --system --dev + +COPY . /code/ + +EXPOSE 8080 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..431d0c0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" + +services: + web: + build: . + command: "python main.py" + volumes: + - .:/code + ports: + - "8080:8080" diff --git a/main.py b/main.py index abf9b33..50606e6 100644 --- a/main.py +++ b/main.py @@ -22,4 +22,4 @@ def index(scene, char_name): def server_static(filename): return static_file(filename, root='results') -run(host='localhost', port=8080) +run(host='0.0.0.0', port=8080)