feat: deployment #46

Merged
matous-volf merged 11 commits from feat/deployment into main 2024-09-13 10:42:20 +00:00
2 changed files with 42 additions and 0 deletions
Showing only changes of commit 7438083a7c - Show all commits

View File

@ -0,0 +1,20 @@
services:
app:
build:
dockerfile: docker/prod/app/Dockerfile
restart: always
ports: [ "8000:8000" ]
depends_on: [ "db" ]
db:
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Minor formatting issues detected by static analysis.

The static analysis tool flagged extra spaces inside the brackets on lines 9 and 13. While this does not affect the functionality, it's recommended to remove the extra spaces for consistency and readability.

Apply this diff to fix the formatting issues:

-    depends_on: [ "db" ]
+    depends_on: ["db"]

-    volumes: [ "db_data:/var/lib/postgresql/data" ]
+    volumes: ["db_data:/var/lib/postgresql/data"]

Also applies to: 13-13

Tools
yamllint

[error] 9-9: too many spaces inside brackets

(brackets)


[error] 9-9: too many spaces inside brackets

(brackets)

**Minor formatting issues detected by static analysis.** The static analysis tool flagged extra spaces inside the brackets on lines 9 and 13. While this does not affect the functionality, it's recommended to remove the extra spaces for consistency and readability. Apply this diff to fix the formatting issues: ```diff - depends_on: [ "db" ] + depends_on: ["db"] - volumes: [ "db_data:/var/lib/postgresql/data" ] + volumes: ["db_data:/var/lib/postgresql/data"] ``` Also applies to: 13-13 <details> <summary>Tools</summary> <details> <summary>yamllint</summary><blockquote> [error] 9-9: too many spaces inside brackets (brackets) --- [error] 9-9: too many spaces inside brackets (brackets) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
image: postgres:16.4-bookworm
volumes: [ "db_data:/var/lib/postgresql/data" ]
ports: [ "5432:5432" ]
environment:
POSTGRES_DB: todo_baggins
POSTGRES_USER: app
POSTGRES_PASSWORD: app
restart: always
volumes:
db_data:

View File

@ -0,0 +1,22 @@
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
FROM rust:1.80-bookworm as builder
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN rustup target add wasm32-unknown-unknown && \
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
cargo install dioxus-cli diesel_cli && \
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
COPY . /srv/app
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
WORKDIR /srv/app
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN npm install
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN npm run build
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN dx build --release
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
FROM debian:bookworm-slim AS runner
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
RUN apt-get update && apt-get install -y libpq5
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
COPY --from=builder /srv/app/dist /srv/app/dist
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
COPY ./.env /srv/app/.env
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
WORKDIR /srv/app
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->
CMD ["./dist/todo-baggins"]
coderabbitai[bot] commented 2024-09-13 09:25:52 +00:00 (Migrated from github.com)
Review

Optimize the builder stage by avoiding additional packages and consolidating RUN instructions.

Consider the following improvements to the builder stage:

  1. Add --no-install-recommends to the apt-get install command to avoid installing unnecessary packages:
-RUN rustup target add wasm32-unknown-unknown && \
-    cargo install dioxus-cli diesel_cli && \
-    apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
+RUN rustup target add wasm32-unknown-unknown && \
+    cargo install dioxus-cli diesel_cli && \
+    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1
  1. Consolidate the multiple RUN instructions for npm install, npm run build, and dx build --release into a single RUN instruction to reduce the number of layers and improve build efficiency:
-RUN npm install
-RUN npm run build
-RUN dx build --release
+RUN npm install && \
+    npm run build && \
+    dx build --release

These optimizations will help reduce the image size and improve the build performance.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

FROM rust:1.80-bookworm AS builder

RUN rustup target add wasm32-unknown-unknown && \
    cargo install dioxus-cli diesel_cli && \
    apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1

COPY . /srv/app
WORKDIR /srv/app

RUN npm install && \
    npm run build && \
    dx build --release
Tools
Hadolint

[info] 3-3: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[info] 11-11: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)


[info] 12-12: Multiple consecutive RUN instructions. Consider consolidation.

(DL3059)

**Optimize the builder stage by avoiding additional packages and consolidating `RUN` instructions.** Consider the following improvements to the builder stage: 1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages: ```diff -RUN rustup target add wasm32-unknown-unknown && \ - cargo install dioxus-cli diesel_cli && \ - apt-get update && apt-get install -y nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 +RUN rustup target add wasm32-unknown-unknown && \ + cargo install dioxus-cli diesel_cli && \ + apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 ``` 2. Consolidate the multiple `RUN` instructions for `npm install`, `npm run build`, and `dx build --release` into a single `RUN` instruction to reduce the number of layers and improve build efficiency: ```diff -RUN npm install -RUN npm run build -RUN dx build --release +RUN npm install && \ + npm run build && \ + dx build --release ``` These optimizations will help reduce the image size and improve the build performance. <!-- suggestion_start --> <details> <summary>Committable suggestion</summary> > :bangbang: **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion FROM rust:1.80-bookworm AS builder RUN rustup target add wasm32-unknown-unknown && \ cargo install dioxus-cli diesel_cli && \ apt-get update && apt-get install -y --no-install-recommends nodejs=18.19.0+dfsg-6~deb12u2 npm=9.2.0~ds1-1 supervisor=4.2.5-1 COPY . /srv/app WORKDIR /srv/app RUN npm install && \ npm run build && \ dx build --release ````` </details> <!-- suggestion_end --> <details> <summary>Tools</summary> <details> <summary>Hadolint</summary><blockquote> [info] 3-3: Avoid additional packages by specifying `--no-install-recommends` (DL3015) --- [info] 11-11: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) --- [info] 12-12: Multiple consecutive `RUN` instructions. Consider consolidation. (DL3059) </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit -->