Skip to content

Commit 4718a16

Browse files
[feat] update angular and react.js docks
1 parent debb3b8 commit 4718a16

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

content/guides/angular/configure-ci-cd.md renamed to content/guides/angular/configure-github-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Automate your builds with GitHub Actions
3-
linkTitle: Configure CI/CD
3+
linkTitle: Automate your builds with GitHub Actions
44
weight: 60
55
keywords: CI/CD, GitHub( Actions), Angular
66
description: Learn how to configure CI/CD using GitHub Actions for your Angular application.

content/guides/angular/deploy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Follow these steps to define your deployment configuration:
3232

3333
2. Open the file in your IDE or preferred text editor.
3434

35-
3. Add the following configuration, and be sure to replace `{DOCKER_USERNAME}` and `{DOCKERHUB_PROJECT_NAME}` with your actual Docker Hub username and repository name from the previous [Configure CI/CD for your Angular application](configure-ci-cd.md).
35+
3. Add the following configuration, and be sure to replace `{DOCKER_USERNAME}` and `{DOCKERHUB_PROJECT_NAME}` with your actual Docker Hub username and repository name from the previous [Automate your builds with GitHub Actions](configure-github-actions.md).
3636

3737

3838
```yaml
@@ -84,7 +84,7 @@ This manifest defines two key Kubernetes resources, separated by `---`:
8484

8585
- Deployment
8686
Deploys a single replica of your Angular application inside a pod. The pod uses the Docker image built and pushed by your GitHub Actions CI/CD workflow
87-
(refer to [Configure CI/CD for your Angular application](configure-ci-cd.md)).
87+
(refer to [Automate your builds with GitHub Actions](configure-github-actions.md)).
8888
The container listens on port `8080`, which is typically used by [Nginx](https://nginx.org/en/docs/) to serve your production Angular app.
8989

9090
- Service (NodePort)

content/guides/reactjs/configure-ci-cd.md renamed to content/guides/reactjs/configure-github-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Configure CI/CD for your React.js application
3-
linkTitle: Configure CI/CD
2+
title: Automate your builds with GitHub Actions
3+
linkTitle: Automate your builds with GitHub Actions
44
weight: 60
55
keywords: CI/CD, GitHub( Actions), React.js, Next.js
66
description: Learn how to configure CI/CD using GitHub Actions for your React.js application.

content/guides/reactjs/containerize.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ description: Learn how to containerize a React.js application with Docker by cre
77

88
---
99

10-
1110
## Prerequisites
1211

1312
Before you begin, make sure the following tools are installed and available on your system:
@@ -135,13 +134,13 @@ FROM node:${NODE_VERSION} AS builder
135134
WORKDIR /app
136135

137136
# Copy package-related files first to leverage Docker's caching mechanism
138-
COPY --link package.json package-lock.json ./
137+
COPY package.json package-lock.json ./
139138

140139
# Install project dependencies using npm ci (ensures a clean, reproducible install)
141140
RUN --mount=type=cache,target=/root/.npm npm ci
142141

143142
# Copy the rest of the application source code into the container
144-
COPY --link . .
143+
COPY . .
145144

146145
# Build the React.js application (outputs to /app/dist)
147146
RUN npm run build
@@ -156,10 +155,10 @@ FROM nginxinc/nginx-unprivileged:${NGINX_VERSION} AS runner
156155
USER nginx
157156

158157
# Copy custom Nginx config
159-
COPY --link nginx.conf /etc/nginx/nginx.conf
158+
COPY nginx.conf /etc/nginx/nginx.conf
160159

161160
# Copy the static build output from the build stage to Nginx's default HTML serving directory
162-
COPY --link --from=builder /app/dist /usr/share/nginx/html
161+
COPY --chown=nginx:nginx --from=builder /app/dist /usr/share/nginx/html
163162

164163
# Expose port 8080 to allow HTTP traffic
165164
# Note: The default NGINX container now listens on port 8080 instead of 80

content/guides/reactjs/deploy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Follow these steps to define your deployment configuration:
3232

3333
2. Open the file in your IDE or preferred text editor.
3434

35-
3. Add the following configuration, and be sure to replace `{DOCKER_USERNAME}` and `{DOCKERHUB_PROJECT_NAME}` with your actual Docker Hub username and repository name from the previous [Configure CI/CD for your React.js application](configure-ci-cd.md).
35+
3. Add the following configuration, and be sure to replace `{DOCKER_USERNAME}` and `{DOCKERHUB_PROJECT_NAME}` with your actual Docker Hub username and repository name from the previous [Automate your builds with GitHub Actions](configure-github-actions.md).
3636

3737

3838
```yaml
@@ -77,7 +77,7 @@ This manifest defines two key Kubernetes resources, separated by `---`:
7777

7878
- Deployment
7979
Deploys a single replica of your React.js application inside a pod. The pod uses the Docker image built and pushed by your GitHub Actions CI/CD workflow
80-
(refer to [Configure CI/CD for your React.js application](configure-ci-cd.md)).
80+
(refer to [Automate your builds with GitHub Actions](configure-github-actions.md)).
8181
The container listens on port `8080`, which is typically used by [Nginx](https://nginx.org/en/docs/) to serve your production React app.
8282

8383
- Service (NodePort)

content/guides/reactjs/develop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ FROM node:${NODE_VERSION} AS dev
4545
WORKDIR /app
4646

4747
# Copy package-related files first to leverage Docker's caching mechanism
48-
COPY --link package.json package-lock.json ./
48+
COPY package.json package-lock.json ./
4949

5050
# Install project dependencies
5151
RUN --mount=type=cache,target=/root/.npm npm install
5252

5353
# Copy the rest of the application source code into the container
54-
COPY --link . .
54+
COPY . .
5555

5656
# Expose the port used by the Vite development server
5757
EXPOSE 5173

0 commit comments

Comments
 (0)