-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 928 Bytes
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 928 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
FROM python:3.11-slim
# Python env vars
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Deps
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# WD
WORKDIR /app
# Python deps
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# Node deps + build
COPY package.json package-lock.json* ./
RUN npm install
COPY . /app_build
RUN cd /app_build && cp -r /app/node_modules . && npm run build
# Copy stuff
RUN mkdir -p /app_defaults && cp -r /app_build/* /app_defaults/ && rm -rf /app_build /app/node_modules
# Anti-entry-point
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Port
EXPOSE 12500
# Boo!
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python", "app.py"]