Skip to content

Commit

Permalink
Adding PM2 to the node images (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpcastro authored Apr 13, 2019
1 parent 135c67f commit 7a584e3
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 1 deletion.
4 changes: 4 additions & 0 deletions images/runtime/node/4.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/4.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/4.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/6.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/6.11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/6.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/6.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/6.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/8.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/8.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/8.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/8.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/8.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
4 changes: 4 additions & 0 deletions images/runtime/node/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ ENV ORYX_AI_INSTRUMENTATION_KEY=${AI_KEY}
RUN mkdir -p /node_modules \
&& chmod 777 /node_modules

# PM2 is supported as an option when running the app,
# so we need to make sure it is available in our images.
RUN npm install -g pm2

COPY --from=startupCmdGen /opt/startupcmdgen/startupcmdgen /opt/startupcmdgen/startupcmdgen
RUN ln -s /opt/startupcmdgen/startupcmdgen /usr/local/bin/oryx
2 changes: 1 addition & 1 deletion tests/Oryx.RuntimeImage.Tests/NodeImagesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void NodeImage_Contains_RequiredPrograms(string nodeTag)
// Arrange & Act
var result = _dockerCli.Run(
$"oryxdevms/node-{nodeTag}:latest",
"sh", new[] { "-c", "which tar && which unzip" });
"sh", new[] { "-c", "which tar && which unzip && which pm2" });

// Assert
RunAsserts(() => Assert.True(result.IsSuccess), result.GetDebugInfo());
Expand Down

0 comments on commit 7a584e3

Please sign in to comment.