-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
44 lines (33 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM node:4.2.2
MAINTAINER Zane McCaig
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# expose our port
EXPOSE 3000
EXPOSE 3443
# Prepare for production
ENV NODE_ENV production
# ** Ensure ENCRYPT_PASSWORD is set before node goes live
# Install universal tools
RUN npm install -g bower grunt
#RUN apt-get update && apt-get -y upgrade libssl1.0.0 openssl && apt-get install -y ruby-full rubygems
RUN apt-get update && apt-get install -y ruby-full rubygems libssl-dev
RUN gem update --system && gem install sass compass
# Install backend dependencies
COPY package.json /usr/src/app/
COPY npm-shrinkwrap.json /usr/src/app/
RUN npm install --production
# Install frontend depencencies
# NPM
COPY client/package.json /usr/src/app/client/
RUN cd client && npm install --production
# Bower
COPY client/bower.json /usr/src/app/client/
COPY client/.bowerrc /usr/src/app/client/
RUN cd client && bower install --allow-root
# Copy the source code over
COPY . /usr/src/app
# Compress the frontend for production
RUN cd client && grunt compress:browser
# Run the application
CMD npm start