-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 766 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 766 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
# Dockerfile
FROM python:3.11-slim
# Prevent Python from buffering stdout/stderr
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# system deps (if needed)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy only requirements first to leverage cache
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Copy app and client into container
COPY app /app/app
COPY client /app/client
# Copy entrypoint script (optional)
COPY start_in_container.sh /app/start_in_container.sh
RUN chmod +x /app/start_in_container.sh
EXPOSE 8765
# Use the env variables in docker-compose to configure MONGO_URI, PORT etc.
CMD [ "bash", "/app/start_in_container.sh" ]