Updated the scripts and Dockerfile
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -16,19 +16,19 @@ WORKDIR /app
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Clone the Git repository
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y git \
|
||||
&& git clone https://gitea.abdulhade.com/abdulhade/db-middleware.git . \
|
||||
&& apt-get remove -y git \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir files/
|
||||
COPY files/requirements.txt files/requirements.txt
|
||||
RUN sleep 5
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r files/requirements.txt
|
||||
|
||||
# Expose port 8080 for the FastAPI application
|
||||
EXPOSE 8080
|
||||
# EXPOSE 8080
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rm files/db.sqlite
|
||||
RUN /usr/local/bin/alembic -c alembic/alembic.ini upgrade head
|
||||
|
||||
# Command to run the FastAPI application
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user