Skip to content

Instantly share code, notes, and snippets.

@zironycho
Created June 27, 2020 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zironycho/a15b683f82b5177bf1fab5607c78801b to your computer and use it in GitHub Desktop.
Save zironycho/a15b683f82b5177bf1fab5607c78801b to your computer and use it in GitHub Desktop.
Outline Dockerfile for production
FROM node:12-alpine
ENV PATH /opt/outline/node_modules/.bin:/opt/node_modules/.bin:$PATH
ENV NODE_PATH /opt/outline/node_modules:/opt/node_modules
ENV APP_PATH /opt/outline
RUN mkdir -p $APP_PATH
WORKDIR $APP_PATH
ARG OUTLINE_VERSION
RUN cd /tmp \
&& wget -O ./outline.tar.gz https://github.com/outline/outline/archive/$OUTLINE_VERSION.tar.gz \
&& tar -xzf outline.tar.gz -C $APP_PATH --strip-components=1 \
&& rm /tmp/outline.tar.gz
RUN yarn install --pure-lockfile
RUN ln -s /opt/outline/node_modules /opt/node_modules
RUN yarn build
CMD yarn start
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment