blob: 178414be55ac33ab414434acf9deac5e1ffde051 [file] [log] [blame]
Matteo Scandolof05d8a62016-12-06 13:36:49 -08001# To build use: docker build -t xosproject/xos-rest-gw .
2# To run use: docker run -p 3000:3000 -d xosproject/xos-rest-gw
Matteo Scandoloe3ed0162016-12-01 10:09:12 -08003
4FROM node:argon
5
6# Set environment variables
7ENV CODE_SOURCE .
8ENV CODE_DEST /var/www
9
10# Create app directory
11WORKDIR ${CODE_DEST}
12
13# Install app dependencies
14COPY ${CODE_SOURCE}/package.json ${CODE_DEST}
15RUN npm install --production
16
17# Bundle app source
18COPY ${CODE_SOURCE}/src ${CODE_DEST}/src
19
20# Create a folder for logs
21RUN mkdir ${CODE_DEST}/logs
22
23EXPOSE 3000
24CMD [ "npm", "start" ]