Skip to content

Commit

Permalink
Try fix app docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
WebGL3D committed Mar 18, 2023
1 parent b3af134 commit ebffd88
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 24 deletions.
38 changes: 26 additions & 12 deletions libs/js/push-notifications/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/js/push-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "tsc"
},
"dependencies": {
"peerDependencies": {
"@types/react": "^18.0.28",
"react": "^18.2.0"
},
Expand Down
17 changes: 12 additions & 5 deletions services/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Setup runtime images
FROM node:19 AS base

# Setup build image
FROM node:19 AS build
# Setup image to build the published module with
FROM node:19 AS build-module

# Copy files over
COPY ./services/app ./services/app
# Copy the files over
COPY ./libs/js ./libs/js

# Install the module packages
# Install the packages
WORKDIR /libs/js/push-notifications
RUN npm ci

# Build the module
RUN npm run build

# Setup build image
FROM node:19 AS build

# Copy files over
COPY --from=build-module /libs/js/push-notifications/dist /libs/js/push-notifications/dist
COPY --from=build-module /libs/js/push-notifications/package.json /libs/js/push-notifications/package.json
COPY ./services/app ./services/app

# Install the packages
WORKDIR /services/app
RUN npm ci
Expand Down
10 changes: 4 additions & 6 deletions services/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ebffd88

Please sign in to comment.