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