2023-08-12 05:26:05 +00:00
|
|
|
FROM node:18.17.1-bookworm
|
2021-07-09 13:46:12 +00:00
|
|
|
|
2023-08-12 05:26:05 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get upgrade --no-install-recommends -y && \
|
|
|
|
apt-get install -y --no-install-recommends curl && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2022-09-10 13:09:55 +00:00
|
|
|
|
2021-07-09 13:46:12 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2022-10-01 14:57:59 +00:00
|
|
|
ENV VITE_NODE_ENV="production"
|
|
|
|
ENV VITE_SERVER_API_ENDPOINT="http://api:5000"
|
|
|
|
ENV VITE_BROWSER_API_ENDPOINT="https://jokesbapak2.reinaldyrafli.com/api"
|
2022-10-01 14:51:13 +00:00
|
|
|
ENV VITE_SENTRY_DSN=""
|
|
|
|
|
2023-08-12 05:26:05 +00:00
|
|
|
RUN npm ci && \
|
|
|
|
npm run build && \
|
|
|
|
rm -rf node_modules && \
|
|
|
|
npm ci --omit=dev
|
2021-07-09 13:46:12 +00:00
|
|
|
|
2021-07-15 19:21:22 +00:00
|
|
|
EXPOSE ${PORT}
|
|
|
|
|
2022-09-10 13:05:26 +00:00
|
|
|
CMD ["node", "dist/index.js"]
|