frontend/Dockerfile

17 lines
375 B
Text
Raw Normal View History

2023-07-19 19:55:16 +00:00
FROM nginx:alpine
# Set up environment for building
2023-07-19 20:23:59 +00:00
RUN apk add yarn nodejs
2023-07-19 19:55:16 +00:00
2023-07-19 20:23:59 +00:00
# Copy files to build environment
RUN mkdir /opt/micromobility-navigation
COPY micromobility-navigation/ /opt/micromobility-navigation
2023-07-19 19:55:16 +00:00
2023-07-19 20:23:59 +00:00
# Run Vite production build
WORKDIR /opt/micromobility-navigation
2023-07-19 19:55:16 +00:00
RUN yarn
RUN yarn run build
2023-07-19 20:23:59 +00:00
# Copy files to nginx path
2023-07-19 19:55:16 +00:00
RUN cp -r dist/* /usr/share/nginx/html