forked from navikt/statusplattform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7882e4
commit 9bd4d1e
Showing
4 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
frontend | ||
gen | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM maven:3.6.3-openjdk-11 as maven | ||
|
||
COPY pom.xml pom.xml | ||
|
||
COPY . . | ||
|
||
RUN mvn clean install | ||
|
||
RUN mvn dependency:go-offline -B | ||
|
||
RUN mvn package | ||
|
||
FROM openjdk:11 | ||
|
||
#RUN dir #Added | ||
|
||
WORKDIR /adevguide | ||
|
||
EXPOSE 3001 | ||
|
||
|
||
#RUN dir #Added | ||
|
||
|
||
COPY --from=maven portal-server/target/portal-server-0.1-SNAPSHOT.jar ./portal-server.jar | ||
|
||
CMD ["java", "-jar", "./portal-server.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Base on offical Node.js Alpine image | ||
FROM node:alpine | ||
|
||
# Set working directory | ||
WORKDIR /usr/app | ||
|
||
# Copy package.json and package-lock.json before other files | ||
# Utilise Docker cache to save re-installing dependencies if unchanged | ||
COPY ./package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install --production | ||
|
||
# Copy all files | ||
COPY .. ./ | ||
|
||
# Build app | ||
RUN npm run build | ||
|
||
# Expose the listening port | ||
EXPOSE 3000 | ||
|
||
# Run container as non-root (unprivileged) user | ||
# The node user is provided in the Node.js Alpine base image | ||
USER node | ||
|
||
# Run npm start script when container starts | ||
CMD [ "npm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters