Skip to content

Commit

Permalink
feat: corrected run_services.sh and DOckerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincerf57 committed Oct 24, 2024
1 parent ff399dd commit 02f536a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions Dockerfile.app
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Dockerfile

# Use Python 3.10 slim version
FROM python:3.10-slim

Expand All @@ -11,10 +9,15 @@ RUN pip install -r requirements.txt
# Copy the application into the /web_service folder
COPY ./src/web_service /web_service

# Expose the correct ports (8001 for the API, 4201 if you want perfect Prefect)
EXPOSE 8001
# Copy the run_services.sh script into the /bin folder
COPY ./bin/run_services.sh /bin/run_services.sh

# Expose the correct ports (8001 for the API, 4201 for Prefect)
EXPOSE 8001 4200


# Set the working directory to /web_service
WORKDIR /web_service
# Make the run_services.sh script executable
RUN chmod +x /bin/run_services.sh

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
# Command to run the script
CMD ["/bin/run_services.sh"]
2 changes: 1 addition & 1 deletion bin/run_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sqlite3 --version
prefect server start --host 0.0.0.0 &

# Go in the good directory
cd ../src/web_service
cd src/web_service

# Start FastAPI with Uvicorn
uvicorn main:app --reload --port 8001

0 comments on commit 02f536a

Please sign in to comment.