Working integration with frontend and backend

This commit is contained in:
cami 2021-05-11 02:04:42 +02:00
commit d312f122cb
6 changed files with 49 additions and 30 deletions

View file

@ -1,2 +1,2 @@
FLASK_APP=src/api.py
FLASK_APP=src/app.py
FLASK_ENV=development

View file

@ -1,18 +1,19 @@
FROM python:latest
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.9
# set working directory
WORKDIR /code
# install app dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# add app
COPY src/ .
# Expose Port 5000
EXPOSE 5000
# start app
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
# Install pip requirements
ADD requirements.txt .
RUN python -m pip install -r requirements.txt
WORKDIR /app
ADD . /app
CMD ["flask", "run"]