You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
662 B
Docker

FROM node:20-alpine AS builder
WORKDIR /app
COPY admin-web/town-editor/package.json admin-web/town-editor/
RUN cd admin-web/town-editor && npm install
COPY admin-web/town-editor admin-web/town-editor
COPY frontend/src frontend/src
COPY frontend/assets frontend/assets
COPY frontend/public frontend/public
RUN cd admin-web/town-editor && npm run build
FROM nginx:alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY admin-web/nginx.conf /etc/nginx/conf.d/default.conf
COPY admin-web/index.html /usr/share/nginx/html/index.html
COPY --from=builder /app/admin-web/town-editor/dist /usr/share/nginx/html/town-editor
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]