-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend backend containerization added
- Loading branch information
1 parent
75852f4
commit 8ad4cb6
Showing
5 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Backend only | ||
FROM python:3.9-slim | ||
|
||
WORKDIR /app-beans | ||
|
||
# Copy the application files to the container | ||
COPY ./requirements-Docker.txt /app-beans/requirements-Docker.txt | ||
COPY ./models /app-beans/models | ||
COPY ./src /app-beans/src | ||
|
||
RUN rm -rf /app-beans/src/data | ||
RUN rm -rf /app-beans/src/features | ||
RUN rm -rf /app-beans/src/visualization | ||
RUN rm -rf /app-beans/src/web | ||
RUN rm -rf /app-beans/src/__pycache__ | ||
RUN rm -rf /app-beans/src/app/__pycache__ | ||
|
||
# Install dependencies | ||
RUN pip install --no-cache-dir -r requirements-Docker.txt -v | ||
|
||
|
||
EXPOSE 8000 | ||
|
||
ENTRYPOINT ["uvicorn", "src.app.api:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-dir", "src/app", "--reload-dir", "models"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Frontend only | ||
FROM python:3.9-slim | ||
|
||
WORKDIR /app-beans | ||
|
||
# Copy the application files to the container | ||
COPY ./requirements-Docker-frontend.txt /app-beans/requirements-Docker-frontend.txt | ||
COPY ./src/web /app-beans/src/web | ||
|
||
|
||
# Install dependencies | ||
RUN pip install --no-cache-dir -r requirements-Docker-frontend.txt -v | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl | ||
|
||
WORKDIR /app-beans/src/web | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["python3", "starter.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Flask==3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters