forked from colmena/colmena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (31 loc) · 811 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
# Base image
FROM node:8
# Add application folder
RUN mkdir /app
WORKDIR /app
# Copy over the whole app
COPY . .
# Copy over the Production settings
COPY production.json /app/config/production.json
# Remove any local configuration settings
RUN touch /app/config/local.yaml
RUN rm /app/config/local*
# Install global dependencies
RUN npm install -g lerna pm2
# Clean up any node_modules we copied over
RUN npm run clean
# Install dependencies
RUN npm install
# Wire up the project with lerna
RUN lerna bootstrap
# Build the Angular app and copy it into the API project
RUN npm run build
# Expose the listening port
EXPOSE 3000
ENV API_PORT 3000
ENV API_HOST 0.0.0.0
ENV API_BASE_URL /
ENV STORAGE_PATH /tmp
ENV NODE_ENV production
# Start the server
CMD ["pm2-docker", "start", "npm", "--", "start"]