added docker files

This commit is contained in:
2023-06-06 16:51:35 +03:00
parent d3d522ef99
commit f77da9cfc5
3 changed files with 28 additions and 1 deletions

17
Dockerfile Normal file
View File

@@ -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

10
docker-compose.yml Normal file
View File

@@ -0,0 +1,10 @@
version: "3"
services:
web:
build: .
command: "python main.py"
volumes:
- .:/code
ports:
- "8080:8080"

View File

@@ -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)