feat: deployment #46
							
								
								
									
										85
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						| @@ -687,6 +687,17 @@ dependencies = [ | ||||
|  "syn 2.0.74", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "diesel_migrations" | ||||
| version = "2.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" | ||||
| dependencies = [ | ||||
|  "diesel", | ||||
|  "migrations_internals", | ||||
|  "migrations_macros", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "diesel_table_macro_syntax" | ||||
| version = "0.2.0" | ||||
| @@ -2028,6 +2039,27 @@ version = "2.7.4" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" | ||||
|  | ||||
| [[package]] | ||||
| name = "migrations_internals" | ||||
| version = "2.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" | ||||
| dependencies = [ | ||||
|  "serde", | ||||
|  "toml", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "migrations_macros" | ||||
| version = "2.2.0" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" | ||||
| dependencies = [ | ||||
|  "migrations_internals", | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "mime" | ||||
| version = "0.3.17" | ||||
| @@ -2575,6 +2607,15 @@ dependencies = [ | ||||
|  "syn 2.0.74", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_spanned" | ||||
| version = "0.6.7" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" | ||||
| dependencies = [ | ||||
|  "serde", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "serde_urlencoded" | ||||
| version = "0.7.1" | ||||
| @@ -2944,6 +2985,7 @@ dependencies = [ | ||||
|  "async-std", | ||||
|  "chrono", | ||||
|  "diesel", | ||||
|  "diesel_migrations", | ||||
|  "dioxus", | ||||
|  "dioxus-logger", | ||||
|  "dioxus-query", | ||||
| @@ -3028,6 +3070,40 @@ dependencies = [ | ||||
|  "tokio", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "toml" | ||||
| version = "0.8.19" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" | ||||
| dependencies = [ | ||||
|  "serde", | ||||
|  "serde_spanned", | ||||
|  "toml_datetime", | ||||
|  "toml_edit", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "toml_datetime" | ||||
| version = "0.6.8" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" | ||||
| dependencies = [ | ||||
|  "serde", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "toml_edit" | ||||
| version = "0.22.20" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" | ||||
| dependencies = [ | ||||
|  "indexmap 2.4.0", | ||||
|  "serde", | ||||
|  "serde_spanned", | ||||
|  "toml_datetime", | ||||
|  "winnow", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "tower" | ||||
| version = "0.4.13" | ||||
| @@ -3625,6 +3701,15 @@ version = "0.52.6" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" | ||||
|  | ||||
| [[package]] | ||||
| name = "winnow" | ||||
| version = "0.6.18" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" | ||||
| dependencies = [ | ||||
|  "memchr", | ||||
| ] | ||||
|  | ||||
| [[package]] | ||||
| name = "xxhash-rust" | ||||
| version = "0.8.12" | ||||
|   | ||||
| @@ -27,6 +27,7 @@ time = "0.3.36" | ||||
| dioxus-sdk = { version = "0.5.0", features = ["i18n"] } | ||||
| unic-langid-impl = "0.9.5" | ||||
| voca_rs = "1.15.2" | ||||
| diesel_migrations = { version = "2.2.0", features = ["postgres"] } | ||||
|  | ||||
| [features] | ||||
| default = [] | ||||
|   | ||||
| @@ -0,0 +1,27 @@ | ||||
| services: | ||||
|   app: | ||||
|     build: | ||||
|       dockerfile: docker/prod/app/Dockerfile | ||||
|     networks: | ||||
|       - default | ||||
|       - web-server-network | ||||
|     restart: always | ||||
|     depends_on: [ "db" ] | ||||
|  | ||||
|  | ||||
|   db: | ||||
|     image: postgres:16.4-bookworm | ||||
|     volumes: [ "db_data:/var/lib/postgresql/data" ] | ||||
|     networks: | ||||
|       - default | ||||
|     environment: | ||||
|       POSTGRES_DB: todo_baggins | ||||
|       POSTGRES_USER: app | ||||
|       POSTGRES_PASSWORD: app | ||||
|     restart: always | ||||
|  | ||||
| volumes: | ||||
|   db_data: | ||||
|  | ||||
| networks: | ||||
|   web-server-network: | ||||
|     external: true | ||||
|   | ||||
| @@ -1,5 +1,3 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| diesel migration run | ||||
|  | ||||
| supervisord -c /etc/supervisor/conf.d/supervisord.conf | ||||
|   | ||||
							
								
								
									
										29
									
								
								docker/prod/app/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,29 @@ | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 -->   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 && \ | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 && \ | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 && \ | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|     npm run build && \ | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|     dx build --release | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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=15.8-0+deb12u1 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 chown -R 1000:1000 /srv/app | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
| HEALTHCHECK CMD curl --fail http://localhost:8000 || exit 1 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
| USER 1000:1000 | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 --> | ||||
|  | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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"] | ||||
|   Optimize the builder stage by avoiding additional packages and consolidating  Consider the following improvements to the builder stage: 
 
 These optimizations will help reduce the image size and improve the build performance. Committable suggestion
 ToolsHadolint
 **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 -->   Optimize the runner stage by avoiding additional packages and deleting apt-get lists. Consider the following improvements to the runner stage: 
 
 These optimizations will help reduce the image size and improve the security of the image by removing unnecessary files. Committable suggestion
 ToolsHadolint
 **Optimize the runner stage by avoiding additional packages and deleting apt-get lists.**
Consider the following improvements to the runner stage:
1. Add `--no-install-recommends` to the `apt-get install` command to avoid installing unnecessary packages:
```diff
-RUN apt-get update && apt-get install -y libpq5=15.8-0+deb12u1
+RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1
```
2. Add `&& rm -rf /var/lib/apt/lists/*` to the `apt-get install` command to delete the apt-get lists after installing packages:
```diff
-RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1
+RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1 && rm -rf /var/lib/apt/lists/*
```
These optimizations will help reduce the image size and improve the security of the image by removing unnecessary files.
<!-- 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 debian:bookworm-slim AS runner
RUN apt-get update && apt-get install -y --no-install-recommends libpq5=15.8-0+deb12u1 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /srv/app/dist /srv/app/dist
COPY .env /srv/app/.env
RUN chown -R 1000:1000 /srv/app
WORKDIR /srv/app
HEALTHCHECK CMD curl --fail http://localhost:8000 || exit 1
USER 1000:1000
CMD ["./dist/todo-baggins"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 16-16: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
---
[info] 16-16: Delete the apt-get lists after installing something
(DL3009)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit --> | ||||
							
								
								
									
										11
									
								
								src/main.rs
									
									
									
									
									
								
							
							
						
						| @@ -7,18 +7,23 @@ mod server; | ||||
| mod query; | ||||
| mod utils; | ||||
| mod internationalization; | ||||
| mod migrations; | ||||
|  | ||||
| use components::app::App; | ||||
| use dioxus::prelude::*; | ||||
| use dioxus_logger::tracing::{info, Level}; | ||||
|  | ||||
| fn main() { | ||||
|     dioxus_logger::init(Level::INFO).expect("failed to initialize logger"); | ||||
|     info!("starting app"); | ||||
|     dioxus_logger::init(Level::INFO).expect("Failed to initialize the logger."); | ||||
|  | ||||
|     info!("Running migrations."); | ||||
|     server_only!( | ||||
|         migrations::run_migrations().expect("Failed to run migrations."); | ||||
|     ); | ||||
|  | ||||
|     info!("Starting app."); | ||||
|     let cfg = server_only!( | ||||
|         dioxus::fullstack::Config::new().addr(std::net::SocketAddr::from(([0, 0, 0, 0], 8000))) | ||||
|     ); | ||||
|  | ||||
|     LaunchBuilder::fullstack().with_cfg(cfg).launch(App); | ||||
| } | ||||
|   | ||||
							
								
								
									
										12
									
								
								src/migrations/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,12 @@ | ||||
| use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness}; | ||||
| use std::error::Error; | ||||
|  | ||||
| const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations"); | ||||
|  | ||||
| pub(crate) fn run_migrations() -> Result<(), Box<dyn Error + Send + Sync + 'static>> { | ||||
|     let mut connection = crate::server::database_connection::establish_database_connection()?; | ||||
|  | ||||
|     connection.run_pending_migrations(MIGRATIONS)?; | ||||
|  | ||||
|     Ok(()) | ||||
| } | ||||
| @@ -1,4 +1,4 @@ | ||||
| mod database_connection; | ||||
| pub(crate) mod database_connection; | ||||
| pub(crate) mod projects; | ||||
| pub(crate) mod tasks; | ||||
| pub(crate) mod subtasks; | ||||
|   | ||||
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:
Also applies to: 13-13
Tools
yamllint