Sign inSign up

alexxxnf/spa-builder

By alexxxnf

•Updated about 6 years ago

Image
0

1.3K

alexxxnf/spa-builder repository overview

⁠SPA Builder

This repo contains Docker image that helps to build SPA⁠.

It's based on node.js⁠ and has npm⁠, yarn⁠ and node-gyp⁠ pre-installed.

It also has gzip⁠ and brotli⁠ to produce pre-compressed static files ready to be served by nginx⁠.

⁠Usage

FROM alexxxnf/spa-builder as builder

COPY ./package.json ./package-lock.json ./yarn.lock /app/
RUN cd /app && yarn

COPY . /app
RUN cd /app \
    && yarn run build --prod \
    && /app/dist \
    && for i in `find | grep -E "\.css$|\.html$|\.js$|\.svg$|\.txt$|\.ttf$"`; do gzip -9kf "$i" && brotli -fZ "$i" ; done

FROM alexxxnf/nginx-spa

COPY --from=builder /app/dist /etc/nginx/html/

⁠Dockerfile

Dockerfile can be found on GitHub⁠

Tag summary

Content type

Image

Digest

Size

28.7 MB

Last updated

about 6 years ago

docker pull alexxxnf/spa-builder