forked from joemccann/dillinger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (40 loc) · 903 Bytes
/
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
45
46
47
# Dillinger Docker File
#
# Installs dillinger on a container
#
# VERSION 1.0.0
FROM nodesource/nsolid-node
MAINTAINER Joe McCann "[email protected]"
MAINTAINER William Blankenship "[email protected]"
#
# install the node dependencies for our node server app
# using caching suggestions per http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/
#
ADD package.json package.json
RUN NODE_ENV=dev npm install
#
# install the app
#
ADD . .
RUN npm run predeploy
#
# running on port 80
# change the port here and elsewhere
#
EXPOSE 80
#
# application environment variables
# change the port here and elsewhere
#
ENV PORT=80
ENV NODE_ENV=production
#
# light this candle
#
CMD ["nsolid", "app.js"]
#
# `docker build` example:
# sudo docker build -t joemccann/dillinger .
#
# `docker run` example:
# docker run -d -p 80:80 --restart="always" joemccann/dillinger