3d-arena / Dockerfile
dylanebert's picture
dylanebert HF staff
add oauth
1e16a1f
raw
history blame contribute delete
729 Bytes
FROM node:alpine
WORKDIR /app
COPY package.json package.json
RUN npm install
RUN --mount=type=secret,id=VITE_HF_TOKEN,mode=0444,required=true \
echo "VITE_HF_TOKEN=$(cat /run/secrets/VITE_HF_TOKEN)" > /app/.env
RUN --mount=type=secret,id=VITE_CLIENT_ID,mode=0444,required=true \
echo "VITE_CLIENT_ID=$(cat /run/secrets/VITE_CLIENT_ID)" >> /app/.env
RUN --mount=type=secret,id=VITE_CLIENT_SECRET,mode=0444,required=true \
echo "VITE_CLIENT_SECRET=$(cat /run/secrets/VITE_CLIENT_SECRET)" >> /app/.env
RUN --mount=type=secret,id=VITE_REDIRECT_URI,mode=0444,required=true \
echo "VITE_REDIRECT_URI=$(cat /run/secrets/VITE_REDIRECT_URI)" >> /app/.env
COPY / /app
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]