-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (42 loc) · 911 Bytes
/
Dockerfile
File metadata and controls
50 lines (42 loc) · 911 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#FROM python:3.13-slim
#
## Install pipenv
#RUN pip install pipenv
#
## Set working directory
#WORKDIR /app
#
## Copy Pipfile and Pipfile.lock
#COPY Pipfile Pipfile.lock ./
#
## Install dependencies
#RUN pipenv install --deploy --system
#
## Copy application code
#COPY app .
#
## Copy Alembic files
#COPY alembic.ini ./
#COPY alembic/ ./alembic/
#
#EXPOSE 8000
#
## Run the application
#CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
FROM python:3.13-slim
# Install pipenv
RUN pip install pipenv
# Set working directory
WORKDIR /app
# Copy Pipfile first for caching
COPY Pipfile Pipfile.lock ./
# Install dependencies
RUN pipenv install --deploy --system
# Copy application code
COPY app/ ./app/
COPY alembic/ ./alembic/
COPY alembic.ini ./
EXPOSE 8000
# Set Python path for Alembic imports
ENV PYTHONPATH=/app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]