FROM registry.yandex.net/mail/ohio/frontend:12.22.10-slim

ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_EXTRA_CA_CERTS=/usr/share/yandex-internal-root-ca/YandexInternalRootCA.crt
ENV NODE_DNS_GRACEFUL_STACK_SWITCH_DEFAULT=4
ENV TZ=Europe/Moscow
ENV NODE_ICU_DATA=/usr/lib/yandex/id-frontend/node_modules/full-icu
ENV NO_COLOR=1

EXPOSE 3000
WORKDIR /usr/lib/yandex/id-frontend/
CMD npm run start:prod

ENV NODE_ENV=${NODE_ENV:-testing}

COPY ./yandex-id-frontend_*_all.deb /tmp
RUN dpkg --unpack /tmp/yandex-id-frontend_*_all.deb
