Skip to content

Commit feeaeb9

Browse files
authored
Remove npmrc (#37)
1 parent e379a07 commit feeaeb9

File tree

8 files changed

+11
-17
lines changed

8 files changed

+11
-17
lines changed

.github/workflows/test.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ jobs:
2222
uses: actions/setup-node@v3
2323
with:
2424
node-version: ${{ matrix.node-version }}
25-
- name: Create .npmrc
26-
run: |
27-
echo '@restatedev:registry=https://npm.pkg.github.com/' > typescript/.npmrc
28-
echo '//npm.pkg.github.com/:_authToken=${GH_PACKAGE_READ_ACCESS_TOKEN}' >> typescript/.npmrc
25+
registry-url: 'https://registry.npmjs.org'
2926
- run: npm ci --prefix typescript
30-
env:
31-
GH_PACKAGE_READ_ACCESS_TOKEN: ${{ secrets.GH_PACKAGE_READ_ACCESS_TOKEN }}
3227
- run: npm run --prefix typescript -ws verify

typescript/ecommerce-store/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Build the Docker containers for the web app and services:
2424

2525
```shell
2626
docker build -t dev.local/shopping-cart/react-app:0.0.1 ./react-shopping-cart
27-
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1 --secret id=npmrc,src=$HOME/.npmrc
27+
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1
2828
```
2929

3030
You can store the products data in the Restate runtime or in a separate Postgres DB:

typescript/ecommerce-store/deployment/aws/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Build the following Docker images and push them to AWS ECR. At the root of the r
2727

2828
```shell
2929
# Shopping services
30-
docker build ./services -t $ECR_REPOSITORY/shopping-cart-demo:1.0.2 --secret id=npmrc,src=$HOME/.npmrc
30+
docker build ./services -t $ECR_REPOSITORY/shopping-cart-demo:1.0.2
3131
docker push $ECR_REPOSITORY/shopping-cart-demo:1.0.2
3232
# Shopping web app
3333
docker build -t $ECR_REPOSITORY/shopping-cart-webapp:1.0.2 ./react-shopping-cart

typescript/ecommerce-store/deployment/knative/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ kn quickstart kind
1212
2. Build the Docker images for the web application and backend services:
1313
```shell
1414
docker build -t dev.local/shopping-cart/react-app:0.0.1 ./react-shopping-cart
15-
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1 --secret id=npmrc,src=$HOME/.npmrc
15+
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1
1616
```
1717

1818
Upload the images to the cluster:

typescript/ecommerce-store/services/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKDIR /usr/src/app
88
# copy package.json and package-lock.json separately to cache dependencies
99
COPY package*.json .
1010
COPY tsconfig.json .
11-
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install
11+
RUN npm install
1212
COPY --chown=node:node . .
1313

1414
RUN npm run proto
@@ -19,4 +19,4 @@ ENV NODE_ENV production
1919
ENV PORT 8080
2020
EXPOSE 8080
2121
USER node
22-
CMD ["dumb-init", "node", "./dist/app.js"]
22+
CMD ["dumb-init", "node", "./dist/app.js"]

typescript/food-ordering/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Have a look at the implementation of the `prepareOrder` function in the `OrderSe
6060
Build the services:
6161

6262
```shell
63-
docker build ./services/ -t dev.local/food-ordering/services:0.0.1 --secret id=npmrc,src=$HOME/.npmrc && \
63+
docker build ./services/ -t dev.local/food-ordering/services:0.0.1 && \
6464
docker build ./pos_server/ -t dev.local/food-ordering/pos_server:0.0.1
6565
```
6666

typescript/food-ordering/services/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ WORKDIR /usr/src/app
77

88
# copy package.json and package-lock.json separately to cache dependencies
99
COPY package*.json .
10-
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install
10+
RUN npm install
1111

1212
COPY --chown=node:node .. .
1313

1414
RUN npm run build
1515

16-
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm prune --omit=dev
16+
RUN npm prune --omit=dev
1717
ENV NODE_ENV production
1818

1919
EXPOSE 8080

typescript/package-lock.json

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)