Rollbar deploy notification

This commit is contained in:
2017-02-14 18:20:03 +00:00
parent dd9b7da32e
commit c85aafd617

View File

@@ -1,9 +1,7 @@
FROM node:7.2.1-alpine
# Environment variables
ENV DATABASE_PATH db/wedding.db
ENV PORT 80
EXPOSE 80
# Need cURL to report to Rollbar
RUN apk --no-cache add curl git
# Copy app
COPY ./ /usr/src/app
@@ -12,8 +10,13 @@ WORKDIR /usr/src/app
# Install dev + prod dependencies and build release
RUN npm install --no-optional --silent
# Run production build
# Environment variables
ENV DATABASE_PATH db/wedding.db
ENV NODE_ENV production
ENV PORT 80
EXPOSE 80
# Run production build
RUN npm run build --release --silent
WORKDIR /usr/src/app/build
@@ -21,4 +24,14 @@ WORKDIR /usr/src/app/build
# Install Node.js dependencies
RUN npm install --production --silent
WORKDIR /usr/src/app
RUN curl https://api.rollbar.com/api/1/deploy/ \
-F access_token=8bf333d044df48c19a6929e4b1613a8e \
-F environment=production \
-F revision=$(git log -n 1 --pretty=format:"%H") \
-F local_username="$(git log -n 1 --pretty=format:"%an")"
WORKDIR /usr/src/app/build
CMD [ "node", "server.js" ]