File size: 889 Bytes
7781557 902845d 7781557 902845d 7781557 |
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 |
FROM python:3.11
RUN apt-get update && apt-get install -y \
curl \
&& curl -fsSL https://deb.nodesource.com/setup_lts.20.15.1| bash - \
&& apt-get install -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y npm
# Verify installation
RUN node --version
RUN npm --version
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
COPY ./requirements.txt ~/app/requirements.txt
RUN pip install -r requirements.txt
COPY . .
USER root
WORKDIR $HOME/app/frontend
RUN npm install -g pnpm
RUN pnpm install --force
RUN pnpm run build
RUN chown -R user:user $HOME/app/frontend
RUN chown -R user:user $HOME/app/backend
USER user
# Change back to app directory
WORKDIR $HOME/app
EXPOSE 5173
EXPOSE 8000
CMD ["/bin/bash", "-c", "./run.sh"] |