focus/frontend/Dockerfile

23 lines
328 B
Docker
Raw Permalink Normal View History

2024-01-03 18:13:54 +01:00
FROM node:20 as frontend-builder
WORKDIR /app
2024-01-11 16:32:48 +01:00
COPY package.json .
COPY package-lock.json .
2024-01-03 18:13:54 +01:00
RUN npm install
2024-01-11 16:32:48 +01:00
COPY . .
2024-01-03 18:13:54 +01:00
RUN npm run build
2024-01-11 16:32:48 +01:00
FROM nginx:alpine
2024-01-03 18:13:54 +01:00
2024-01-11 16:32:48 +01:00
COPY --from=frontend-builder /app/build /usr/share/nginx/html
COPY run.sh .
RUN chmod +x run.sh
2024-01-03 18:13:54 +01:00
2024-01-11 16:32:48 +01:00
EXPOSE 80
2024-01-03 18:13:54 +01:00
2024-01-10 00:39:55 +01:00
ENV PUBLIC_BACKEND_URL=http://localhost:3000
2024-01-11 16:32:48 +01:00
CMD ["./run.sh"]