-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 797 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy the dependencies file to the working directory
COPY requirements.txt .
# Install git and other dependencies
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git && \
pip install pytest && \
pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . .
#
ENV CONFIG_PATH='/api-variables/config_db.ini'
# Make port 3500 available to the world outside this container
EXPOSE 3500
# Run the application
# uvicorn main:app --root-path /api --host 0.0.0.0 --port 3500 --reload
CMD ["uvicorn", "main:app", "--root-path", "/api", "--host", "0.0.0.0", "--port", "3500", "--reload"]