-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (36 loc) · 1.06 KB
/
Copy pathDockerfile
File metadata and controls
48 lines (36 loc) · 1.06 KB
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
# Use Python 3.11-slim as the base image
FROM python:3.11-slim
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
redis-server \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
echo 'export PATH="/root/.cargo/bin:$PATH"' >> ~/.bashrc && \
. ~/.bashrc
# Copy the entire project into the container
COPY . /app
# Make the entrypoint script executable
RUN chmod +x /app/entrypoint.sh
# Install Python dependencies
RUN python -m venv /venv && \
. /venv/bin/activate && \
pip install -r backend/config/requirements.txt
# Configure Redis
COPY backend/config/redis.conf /etc/redis/redis.conf
RUN mkdir -p /data/redis && \
chown -R redis:redis /data/redis
# Set Python path
ENV PYTHONPATH=/app
# Expose ports
EXPOSE 6379 8000 4000 8080
# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]
# Set the default command to an empty array
CMD []