FROM node:latest

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

#Installing fonts

RUN apt-get update || true
RUN apt-get install -y --no-install-recommends \
        gnupg \
        ca-certificates \
        fontconfig || true

RUN mkdir -p /usr/local/share/fonts/truetype/fredoka
COPY ./wwwroot/assets/fonts/Fredoka/fredoka.ttf /usr/local/share/fonts/truetype/fredoka/fredoka.ttf
RUN fc-cache -fv

CMD ["npm", "run", "start"]