Skip to content

Commit a48d178

Browse files
committed
chore: bump to Node 20
1 parent 95b7ba5 commit a48d178

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Node.js",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-18",
6+
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-22-bookworm",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
"features": {
@@ -20,7 +20,7 @@
2020
"forwardPorts": [4001, 4002, 4003, 4280],
2121

2222
// Use 'postCreateCommand' to run commands after the container is created.
23-
"postCreateCommand": "npm i -g npm@latest pino-pretty fuzz-run && npm install && docker pull node:18-alpine",
23+
"postCreateCommand": "npm i -g npm@latest pino-pretty fuzz-run && npm install && docker pull node:20-alpine",
2424

2525
// Configure tool-specific properties.
2626
"customizations": {

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout the project
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Login to Azure
1818
run: .azure/setup.sh --ci-login

.github/workflows/packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
contents: write
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
- name: Create packages
1717
run: ./scripts/create-packages.sh
1818
- name: Update release

.github/workflows/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Update template
1515
run: |
1616
git config --global user.name "sinedied"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Discover the fundamentals of microservices architecture and how to implement the
55
👉 [See the workshop](https://aka.ms/ws/node-microservices)
66

77
## Prerequisites
8-
- Node.js v18+
8+
- Node.js v20+
99
- Docker v20+
1010
- An Azure account ([sign up for free here](https://azure.microsoft.com/free/?WT.mc_id=javascript-0000-yolasors))
1111

docs/workshop.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ If you want to work locally without using a dev container, you need to clone the
168168
|---------------|--------------------------------|
169169
| Git | [Get Git](https://git-scm.com) |
170170
| Docker v20+ | [Get Docker](https://docs.docker.com/get-docker) |
171-
| Node.js v18+ | [Get Node.js](https://nodejs.org) |
171+
| Node.js v20+ | [Get Node.js](https://nodejs.org) |
172172
| Azure CLI | [Get Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli#install) |
173173
| GitHub CLI | [Get GitHub CLI](https://cli.github.com/manual/installation) |
174174
| Azure Static Web Apps CLI | [Get Azure Static Web Apps CLI](https://github.com/Azure/static-web-apps-cli#installing-the-cli-with-npm-yarn-or-pnpm) |
@@ -478,7 +478,7 @@ Let's create a file `Dockerfile` under the `packages/settings-api` folder to bui
478478

479479
```dockerfile
480480
# syntax=docker/dockerfile:1
481-
FROM node:18-alpine
481+
FROM node:20-alpine
482482
ENV NODE_ENV=production
483483

484484
WORKDIR /app
@@ -489,7 +489,7 @@ EXPOSE 4001
489489
CMD [ "npm", "start", "--workspace=settings-api" ]
490490
```
491491

492-
The first statement `FROM node:18-alpine` means that we use the [node image](https://hub.docker.com/_/node) as a base, with Node.js 18 installed. The `alpine` variant is a lightweight version of the image, that results in a smaller container size, which is great for production environments.
492+
The first statement `FROM node:20-alpine` means that we use the [node image](https://hub.docker.com/_/node) as a base, with Node.js 20 installed. The `alpine` variant is a lightweight version of the image, that results in a smaller container size, which is great for production environments.
493493

494494
The second statement `ENV NODE_ENV=production` sets the `NODE_ENV` environment variable to `production`. This is a convention in the Node.js ecosystem to indicate that the app is running in production mode. It enables production optimizations in most frameworks.
495495

@@ -791,7 +791,7 @@ We'll use the [multi-stage build](https://docs.docker.com/develop/develop-images
791791

792792
# Build Node.js app
793793
# ------------------------------------
794-
FROM node:18-alpine as build
794+
FROM node:20-alpine as build
795795
WORKDIR /app
796796
COPY ./package*.json ./
797797
COPY ./packages/dice-api ./packages/dice-api
@@ -808,7 +808,7 @@ Now we can create the second stage of our Dockerfile, that will be used to creat
808808
```dockerfile
809809
# Run Node.js app
810810
# ------------------------------------
811-
FROM node:18-alpine
811+
FROM node:20-alpine
812812
ENV NODE_ENV=production
813813

814814
WORKDIR /app
@@ -1170,7 +1170,7 @@ Let's create a file `Dockerfile` under the `packages/gateway-api`:
11701170
11711171
```dockerfile
11721172
# syntax=docker/dockerfile:1
1173-
FROM node:18-alpine
1173+
FROM node:20-alpine
11741174
ENV NODE_ENV=production
11751175

11761176
WORKDIR /app
@@ -2114,7 +2114,7 @@ jobs:
21142114
runs-on: ubuntu-latest
21152115
steps:
21162116
- name: Checkout the project
2117-
uses: actions/checkout@v3
2117+
uses: actions/checkout@v4
21182118
21192119
- name: Login to Azure
21202120
run: .azure/setup.sh --ci-login

packages/dice-api/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Build Node.js app
44
# ------------------------------------
5-
FROM node:18-alpine as build
5+
FROM node:20-alpine as build
66
WORKDIR /app
77
COPY ./package*.json ./
88
COPY ./packages/dice-api ./packages/dice-api
@@ -11,7 +11,7 @@ RUN npm run build --workspace=dice-api
1111

1212
# Run Node.js app
1313
# ------------------------------------
14-
FROM node:18-alpine
14+
FROM node:20-alpine
1515
ENV NODE_ENV=production
1616

1717
WORKDIR /app

packages/gateway-api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Run Node.js app
44
# ------------------------------------
5-
FROM node:18-alpine
5+
FROM node:20-alpine
66
ENV NODE_ENV=production
77

88
WORKDIR /app

packages/settings-api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Run Node.js app
44
# ------------------------------------
5-
FROM node:18-alpine
5+
FROM node:20-alpine
66
ENV NODE_ENV=production
77

88
WORKDIR /app

0 commit comments

Comments
 (0)