Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove npmrc #37

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Create .npmrc
run: |
echo '@restatedev:registry=https://npm.pkg.github.com/' > typescript/.npmrc
echo '//npm.pkg.github.com/:_authToken=${GH_PACKAGE_READ_ACCESS_TOKEN}' >> typescript/.npmrc
registry-url: 'https://registry.npmjs.org'
- run: npm ci --prefix typescript
env:
GH_PACKAGE_READ_ACCESS_TOKEN: ${{ secrets.GH_PACKAGE_READ_ACCESS_TOKEN }}
- run: npm run --prefix typescript -ws verify
2 changes: 1 addition & 1 deletion typescript/ecommerce-store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Build the Docker containers for the web app and services:

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

You can store the products data in the Restate runtime or in a separate Postgres DB:
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecommerce-store/deployment/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Build the following Docker images and push them to AWS ECR. At the root of the r

```shell
# Shopping services
docker build ./services -t $ECR_REPOSITORY/shopping-cart-demo:1.0.2 --secret id=npmrc,src=$HOME/.npmrc
docker build ./services -t $ECR_REPOSITORY/shopping-cart-demo:1.0.2
docker push $ECR_REPOSITORY/shopping-cart-demo:1.0.2
# Shopping web app
docker build -t $ECR_REPOSITORY/shopping-cart-webapp:1.0.2 ./react-shopping-cart
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecommerce-store/deployment/knative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kn quickstart kind
2. Build the Docker images for the web application and backend services:
```shell
docker build -t dev.local/shopping-cart/react-app:0.0.1 ./react-shopping-cart
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1 --secret id=npmrc,src=$HOME/.npmrc
docker build ./services/ -t dev.local/shopping-cart/services:0.0.1
```

Upload the images to the cluster:
Expand Down
4 changes: 2 additions & 2 deletions typescript/ecommerce-store/services/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKDIR /usr/src/app
# copy package.json and package-lock.json separately to cache dependencies
COPY package*.json .
COPY tsconfig.json .
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm install
RUN npm install
COPY --chown=node:node . .

RUN npm run proto
Expand All @@ -19,4 +19,4 @@ ENV NODE_ENV production
ENV PORT 8080
EXPOSE 8080
USER node
CMD ["dumb-init", "node", "./dist/app.js"]
CMD ["dumb-init", "node", "./dist/app.js"]
2 changes: 1 addition & 1 deletion typescript/food-ordering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Have a look at the implementation of the `prepareOrder` function in the `OrderSe
Build the services:

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

Expand Down
4 changes: 2 additions & 2 deletions typescript/food-ordering/services/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ WORKDIR /usr/src/app

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

COPY --chown=node:node .. .

RUN npm run build

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

EXPOSE 8080
Expand Down
5 changes: 2 additions & 3 deletions typescript/package-lock.json

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

Loading