sinfo / eventdeck

:calendar: The awesome web app that supports awesome events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create Dockerfile

JGAntunes opened this issue · comments

This is just an example pulled from other projects which might have different requirements from this one (it's a node app still, but doesn't need mongo and other stuff). But it might be cool to use this as a basis for something else.

The idea is to containerise the app and have it running on a single container. From there we'll see what we'll use.

FROM alpine

WORKDIR /code

ENV APK_PACKAGES bash
ENV NODE_ENV production
ENV PORT 3000

RUN apk \
    --update-cache --repository http://dl-2.alpinelinux.org/alpine/edge/main \
    --update add \
    "nodejs<7.0.0" \
    ${APK_PACKAGES} \
    && rm -rf /var/cache/apk/*

RUN npm install -g yarn && rm -rf ~/.npm

EXPOSE 3000

COPY package.json yarn.lock ./
RUN yarn && rm -rf ~/.yarn-cache
COPY . .
CMD [ "node", "src/index.js" ]

LABEL \
    version="" \
    os="linux" \
    arch="amd64"