-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (29 loc) · 982 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
# Pulling the docker images we need
FROM node:latest
MAINTAINER Stephen Rodriguez <[email protected]>
# Labelling the docker image version/details
LABEL version="1.0"
LABEL description="a nodejs starter template for deploying apis built in typescript"
###################################
###### SETUP STACK ######
###################################
# Setup the application folder
RUN mkdir -p /usr/src/app
# Change our working directory
WORKDIR /usr/src/app
# Copy project files into the application folder
COPY . /usr/src/app
ENV PORT=80
# Install Dependencies (not devDependencies)
RUN npm install -g yarn
RUN yarn install
###################################
###### EXPOSE PORT ######
###################################
# 10. Expose the app on port 80
EXPOSE 80
###############################
###### RUN APP ######
###############################
# 11. Run the application specific build/run commands
CMD ["node", "bin/web.js"]