Files
seisee/backend.Dockerfile

31 lines
672 B
Docker

FROM node:20-slim
# Installer Python et les dépendances système pour h5py
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
libhdf5-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Créer un venv pour éviter le blocage PEP 668
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Installer les librairies Python
RUN pip install h5py numpy tqdm pandas psycopg2-binary
# On ne copie pas le node_modules du disque (architecture potentiellement différente)
COPY package*.json ./
RUN npm install --include=dev
COPY . .
# On expose le port interne 3001
EXPOSE 3001
CMD ["npm", "run", "dev"]