Skip to content

Commit

Permalink
chore: now deployments (#237)
Browse files Browse the repository at this point in the history
* chore: now deploy

* chore: use version 1 now deployment with Docker
  • Loading branch information
abarmat authored and nicosantangelo committed Mar 18, 2019
1 parent bc9edb7 commit 2c74f0d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
.dockerignore
Dockerfile
npm-debug.log
.git
.hg
.svn
2 changes: 2 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Build Stage

FROM node:10.15.1 as base

# env vars for building
ENV NODE_PATH src
ENV REACT_APP_ASSETS_URL https://builder-pack.now.sh/
ENV REACT_APP_CONTENT_SERVER_URL https://content.decentraland.today/contents/
ENV REACT_APP_CONTEST_SERVER_URL https://contest-server.decentraland.today
ENV REACT_APP_INTERCOM_APP_ID z0h94kay
ENV REACT_APP_LOCAL_STORAGE_KEY builder
ENV REACT_APP_MANA_TOKEN_CONTRACT_ADDRESS 0x2a8fd99c19271f4f04b1b7b9c4f7cf264b626edb

# base packages
RUN \
apt-get update && apt-get upgrade -y && \
apt-get install -y build-essential g++

# use cached layer for node modules
ADD package.json /tmp/package.json
RUN cd /tmp && npm install

# set the default working directory
RUN mkdir -p /app
RUN cp -a /tmp/node_modules /app/

# copy local files
ADD . /app
ADD package.json /app/package.json
WORKDIR /app

# build and export the app
RUN npm run build

## Deploy Stage

FROM node:10.15.1

COPY --from=base /app/build /public
11 changes: 11 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "builder",
"alias": "builder-staging",
"version": 1,
"type": "static",
"public": false,
"github": {
"autoAlias": true,
"enabled": true
}
}

1 comment on commit 2c74f0d

@vercel
Copy link

@vercel vercel bot commented on 2c74f0d Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully aliased the URL https://builder-boiclyymar.now.sh to the following alias.

Please sign in to comment.