-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathDockerfile.single-stage
More file actions
30 lines (21 loc) · 911 Bytes
/
Dockerfile.single-stage
File metadata and controls
30 lines (21 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
FROM nikolaik/python-nodejs:python3.10-nodejs18
# Install system dependencies first (rarely changes, good for caching)
RUN apt-get update && \
apt-get install -y build-essential libffi-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy only dependency files first (these change less frequently)
COPY requirements.txt .
COPY client/package.json client/package-lock.json ./client/
# Install Python dependencies (cached unless requirements.txt changes)
RUN pip install --no-cache-dir -r requirements.txt
# Install Node dependencies (cached unless package files change)
RUN cd client && npm ci --prefer-offline --no-audit
# Copy the rest of the application code
COPY . .
# Make scripts executable
RUN chmod +x run.sh verify_env.py verify_data_migrations.py
# Build frontend (only rebuilds when source or dependencies change)
RUN cd client && npm run build
EXPOSE 5001
ENTRYPOINT ["./run.sh"]