Select Git revision

jan.bednarik authored
Dockerfile 763 B
FROM node:21
RUN apt-get update \
&& apt-get install -y python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /app
WORKDIR /app
COPY requirements requirements/
RUN pip3 install --break-system-packages -r requirements/base.txt -r requirements/prod.txt
COPY . .
RUN bash -c 'adduser --disabled-login --quiet --gecos app app && \
chown -R app:app /app/ && \
chmod o+x /app/run.sh'
USER app
RUN npm i
RUN npm run prod
ENV DJANGO_SETTINGS_MODULE "majak_uistyleguide.settings.production"
# fake values for required env variables used to run collectstatic during build
RUN DJANGO_SECRET_KEY=x DATABASE_URL=postgres://x/x DJANGO_ALLOWED_HOSTS=x \
python3 manage.py collectstatic
EXPOSE 8000
CMD ["bash", "run.sh"]