-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (34 loc) · 983 Bytes
/
Dockerfile
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
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
NODE_VERSION=20.x \
DEBIAN_FRONTEND=noninteractive \
TZ=Europe/Lisbon
WORKDIR /app
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
libpq-dev \
curl \
gnupg \
bash \
git \
netcat-traditional \
&& curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/media /app/static /app/frontend /app/bot_data \
&& chmod -R 755 /app/media /app/static /app/bot_data
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY frontend/package*.json ./frontend/
WORKDIR /app/frontend
RUN npm install
WORKDIR /app
COPY . .
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
sed -i 's/\r$//g' /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]