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
|
2023-07-20 14:29:38 +00:00
|
|
|
COPY . /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
|