Skip to content

Commit

Permalink
moved to nginx deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
marcj committed Mar 17, 2019
1 parent 368cdd2 commit 2cc14d4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 29 deletions.
25 changes: 20 additions & 5 deletions Dockerfile
@@ -1,13 +1,28 @@
FROM node:alpine

RUN npm config set unsafe-perm true
RUN npm i -g lerna
RUN apk --no-cache add git

ADD . /estdlib
ADD . /lib
RUN cd /lib && npm run bootstrap && npm run docs

RUN cd /estdlib && npm run bootstrap && npm run docs
FROM nginx:alpine

RUN cd /estdlib/website && npm install
ENV PORT=8080

WORKDIR /estdlib/website
CMD [ "npm", "run", "server" ]
COPY --from=0 /lib/docs /usr/share/nginx/html

RUN echo "gzip on; \
gzip_buffers 16 8k; \
gzip_comp_level 1; \
gzip_http_version 1.1; \
gzip_min_length 10; \
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon application/vnd.ms-fontobject font/opentype application/x-font-ttf; \
gzip_vary on; \
gzip_proxied any; # Compression for all requests. \
## No need for regexps. See \
## http://wiki.nginx.org/NginxHttpGzipModule#gzip_disable \
gzip_disable msie6;" > /etc/nginx/conf.d/gzip.conf

CMD sed -i -e "s/listen 80/listen $PORT/g" /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
16 changes: 0 additions & 16 deletions website/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions website/server.ts

This file was deleted.

0 comments on commit 2cc14d4

Please sign in to comment.