phatboislym

Dockerfile

Jun 22nd, 2023
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | Software | 0 0
  1. # Base image
  2. FROM ubuntu:22.04
  3.  
  4. # Install apt packages and update refs
  5. RUN apt-get update -y && apt-get upgrade -y
  6.  
  7. # Install Python and other requirements
  8. RUN apt-get install -y vim nano python3.10 python3-pip python3-dev build-essential libpq-dev curl git bat
  9.  
  10. # Install PostgreSQL client
  11. RUN apt-get install -y postgresql-client
  12.  
  13. # Set working directory
  14. WORKDIR /app
  15.  
  16. # Copy and install Python dependencies
  17. COPY requirements.txt .
  18. RUN pip install -r requirements.txt
  19.  
  20. # Install uvicorn
  21. RUN pip install uvicorn
  22.  
  23. # Copy the application code
  24. COPY . .
  25.  
  26. # Expose the required port (adjust if needed)
  27. EXPOSE 8000
  28.  
  29. # Set the entrypoint command
  30. CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
  31.  
Advertisement
Add Comment
Please, Sign In to add comment