feat: ability to create a project #9
3
.gitignore
vendored
@ -5,3 +5,6 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
|
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
|
|
||||||
|
.env
|
||||||
|
.env.prod
|
||||||
|
90
Cargo.lock
generated
@ -110,6 +110,12 @@ version = "3.16.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "byteorder"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytes"
|
name = "bytes"
|
||||||
version = "1.7.1"
|
version = "1.7.1"
|
||||||
@ -276,6 +282,7 @@ dependencies = [
|
|||||||
"ident_case",
|
"ident_case",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
"strsim",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -303,6 +310,41 @@ dependencies = [
|
|||||||
"parking_lot_core",
|
"parking_lot_core",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "diesel"
|
||||||
|
version = "2.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bf97ee7261bb708fa3402fa9c17a54b70e90e3cb98afb3dc8999d5512cb03f94"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
"byteorder",
|
||||||
|
"diesel_derives",
|
||||||
|
"itoa",
|
||||||
|
"pq-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "diesel_derives"
|
||||||
|
version = "2.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d6ff2be1e7312c858b2ef974f5c7089833ae57b5311b334b30923af58e5718d8"
|
||||||
|
dependencies = [
|
||||||
|
"diesel_table_macro_syntax",
|
||||||
|
"dsl_auto_type",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "diesel_table_macro_syntax"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25"
|
||||||
|
dependencies = [
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dioxus"
|
name = "dioxus"
|
||||||
version = "0.5.6"
|
version = "0.5.6"
|
||||||
@ -612,6 +654,26 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dsl_auto_type"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607"
|
||||||
|
dependencies = [
|
||||||
|
"darling",
|
||||||
|
"either",
|
||||||
|
"heck",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "either"
|
||||||
|
version = "1.13.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "enumset"
|
name = "enumset"
|
||||||
version = "1.1.5"
|
version = "1.1.5"
|
||||||
@ -1025,6 +1087,12 @@ dependencies = [
|
|||||||
"allocator-api2",
|
"allocator-api2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "heck"
|
||||||
|
version = "0.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http"
|
name = "http"
|
||||||
version = "0.2.12"
|
version = "0.2.12"
|
||||||
@ -1331,6 +1399,15 @@ dependencies = [
|
|||||||
"futures-io",
|
"futures-io",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pq-sys"
|
||||||
|
version = "0.6.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584"
|
||||||
|
dependencies = [
|
||||||
|
"vcpkg",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prettyplease"
|
name = "prettyplease"
|
||||||
version = "0.2.20"
|
version = "0.2.20"
|
||||||
@ -1626,6 +1703,12 @@ dependencies = [
|
|||||||
"lock_api",
|
"lock_api",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strsim"
|
||||||
|
version = "0.11.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.74"
|
version = "2.0.74"
|
||||||
@ -1692,6 +1775,7 @@ checksum = "c7c4ceeeca15c8384bbc3e011dbd8fccb7f068a440b752b7d9b32ceb0ca0e2e8"
|
|||||||
name = "todo-baggins"
|
name = "todo-baggins"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"diesel",
|
||||||
"dioxus",
|
"dioxus",
|
||||||
"dioxus-logger",
|
"dioxus-logger",
|
||||||
]
|
]
|
||||||
@ -1820,6 +1904,12 @@ version = "0.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "vcpkg"
|
||||||
|
version = "0.2.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "version_check"
|
name = "version_check"
|
||||||
version = "0.9.5"
|
version = "0.9.5"
|
||||||
|
@ -7,6 +7,7 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
diesel = { version = "2.2.2", features = ["postgres"] }
|
||||||
|
|
||||||
dioxus = { version = "0.5", features = ["web", "router"] }
|
dioxus = { version = "0.5", features = ["web", "router"] }
|
||||||
![]()
Dioxus Router Feature May Be Unnecessary The
Analysis chainConfirm Dioxus features align with project needs. Dioxus is configured with Scripts executedThe following scripts were executed for the analysis: Script:
Length of output: 900 Script:
Length of output: 30 Script:
Length of output: 166 Script:
Length of output: 51 > [!TIP]
> Codebase Verification
**Dioxus Router Feature May Be Unnecessary**
The `router` feature of Dioxus does not appear to be used in the codebase. You might consider removing it from the `Cargo.toml` to simplify dependencies unless there are plans to use it in the future.
- No imports or usage of Dioxus's router feature were found in the codebase.
<details>
<summary>Analysis chain</summary>
**Confirm Dioxus features align with project needs.**
Dioxus is configured with `fullstack` and `router` features. Ensure these features are necessary for your application.
</details>
<details>
<summary>Scripts executed</summary>
The following scripts were executed for the analysis:
Script:
```shell
#!/bin/bash
# Description: Verify Dioxus features configuration in the codebase.
# Test: Search for Dioxus usage. Expect: Only necessary features are enabled.
rg --type rust 'dioxus'
```
Length of output: 900
---
Script:
```shell
#!/bin/bash
# Description: Verify the usage of Dioxus router feature in the codebase.
# Search for Dioxus router usage in the codebase.
rg --type rust 'dioxus_router'
```
Length of output: 30
---
Script:
```shell
#!/bin/bash
# Description: Broaden the search for routing-related functionality in the codebase.
# Search for terms related to routing that might indicate the use of Dioxus router.
rg --type rust 'route|router|navigate|switch|link|redirect'
```
Length of output: 166
---
Script:
```shell
#!/bin/bash
# Description: Check for specific imports or usage of Dioxus's router feature.
# Search for Dioxus router module or related imports.
rg --type rust 'use dioxus::router|dioxus_router'
```
Length of output: 51
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
![]() Consolidate Multiple consecutive
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image.
```dockerfile
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Pin versions in It's recommended to pin versions in
ToolsHadolint
Clean up To reduce the image size, delete the
ToolsHadolint
Use Using
ToolsHadolint
**Pin versions in `apt-get install`.**
It's recommended to pin versions in `apt-get install` to ensure consistent builds.
```dockerfile
RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Clean up `apt-get` lists after installation.**
To reduce the image size, delete the `apt-get` lists after installing packages.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Use `--no-install-recommends` to avoid unnecessary packages.**
Using `--no-install-recommends` can help avoid installing additional packages that are not needed.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Multiple consecutive
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image.
```dockerfile
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Pin versions in It's recommended to pin versions in
ToolsHadolint
Clean up To reduce the image size, delete the
ToolsHadolint
Use Using
ToolsHadolint
**Pin versions in `apt-get install`.**
It's recommended to pin versions in `apt-get install` to ensure consistent builds.
```dockerfile
RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Clean up `apt-get` lists after installation.**
To reduce the image size, delete the `apt-get` lists after installing packages.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Use `--no-install-recommends` to avoid unnecessary packages.**
Using `--no-install-recommends` can help avoid installing additional packages that are not needed.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Avoid using For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
ToolsHadolint
**Avoid using `USER root` as the last instruction.**
For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
```dockerfile
# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 15-15: Last USER should not be root
(DL3002)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Avoid using For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
ToolsHadolint
**Avoid using `USER root` as the last instruction.**
For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
```dockerfile
# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 15-15: Last USER should not be root
(DL3002)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Consolidate the
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Consolidate the `RUN` instructions to reduce the number of layers in the Docker image.
```dockerfile
RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
mkdir -p /.local/share/dioxus
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Consolidate the
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Consolidate the `RUN` instructions to reduce the number of layers in the Docker image.
```dockerfile
RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
mkdir -p /.local/share/dioxus
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Use JSON notation for CMD instruction. Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
Committable suggestion
ToolsHadolint
**Use JSON notation for CMD instruction.**
Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
```diff
- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
```
<!-- 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
CMD ["sh", "docker/dev/app/entrypoint.sh"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments
(DL3025)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Use JSON notation for CMD instruction. Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
Committable suggestion
ToolsHadolint
**Use JSON notation for CMD instruction.**
Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
```diff
- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
```
<!-- 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
CMD ["sh", "docker/dev/app/entrypoint.sh"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments
(DL3025)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
FROM rust:1.80-bookworm
|
FROM rust:1.80-bookworm
|
||||||
|
|
||||||
RUN rustup target add wasm32-unknown-unknown
|
RUN rustup target add wasm32-unknown-unknown
|
||||||
RUN cargo install dioxus-cli
|
RUN cargo install dioxus-cli diesel_cli
|
||||||
![]() Consolidate Multiple consecutive
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image.
```dockerfile
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Pin versions in It's recommended to pin versions in
ToolsHadolint
Clean up To reduce the image size, delete the
ToolsHadolint
Use Using
ToolsHadolint
**Pin versions in `apt-get install`.**
It's recommended to pin versions in `apt-get install` to ensure consistent builds.
```dockerfile
RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Clean up `apt-get` lists after installation.**
To reduce the image size, delete the `apt-get` lists after installing packages.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Use `--no-install-recommends` to avoid unnecessary packages.**
Using `--no-install-recommends` can help avoid installing additional packages that are not needed.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Avoid using For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
ToolsHadolint
**Avoid using `USER root` as the last instruction.**
For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
```dockerfile
# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 15-15: Last USER should not be root
(DL3002)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Consolidate the
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Consolidate the `RUN` instructions to reduce the number of layers in the Docker image.
```dockerfile
RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
mkdir -p /.local/share/dioxus
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Use JSON notation for CMD instruction. Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
Committable suggestion
ToolsHadolint
**Use JSON notation for CMD instruction.**
Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
```diff
- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
```
<!-- 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
CMD ["sh", "docker/dev/app/entrypoint.sh"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments
(DL3025)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Multiple consecutive
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image.
```dockerfile
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Pin versions in It's recommended to pin versions in
ToolsHadolint
Clean up To reduce the image size, delete the
ToolsHadolint
Use Using
ToolsHadolint
**Pin versions in `apt-get install`.**
It's recommended to pin versions in `apt-get install` to ensure consistent builds.
```dockerfile
RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Clean up `apt-get` lists after installation.**
To reduce the image size, delete the `apt-get` lists after installing packages.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Use `--no-install-recommends` to avoid unnecessary packages.**
Using `--no-install-recommends` can help avoid installing additional packages that are not needed.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Avoid using For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
ToolsHadolint
**Avoid using `USER root` as the last instruction.**
For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
```dockerfile
# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 15-15: Last USER should not be root
(DL3002)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Consolidate the
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Consolidate the `RUN` instructions to reduce the number of layers in the Docker image.
```dockerfile
RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
mkdir -p /.local/share/dioxus
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Use JSON notation for CMD instruction. Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
Committable suggestion
ToolsHadolint
**Use JSON notation for CMD instruction.**
Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
```diff
- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
```
<!-- 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
CMD ["sh", "docker/dev/app/entrypoint.sh"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments
(DL3025)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
RUN apt-get update && apt-get install -y nodejs npm
|
RUN apt-get update && apt-get install -y nodejs npm
|
||||||
![]() Consolidate Consolidating
ToolsHadolint
**Consolidate `RUN` instructions and clean up `apt-get` lists.**
Consolidating `RUN` instructions can reduce the number of layers in the Docker image. Additionally, cleaning up `apt-get` lists can help reduce the image size.
```dockerfile
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 && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 3-3: Delete the apt-get lists after installing something
(DL3009)
---
[info] 3-3: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
|||||||
|
|
||||||
COPY . /srv/app
|
COPY . /srv/app
|
||||||
|
|||||||
![]() Consolidate Multiple consecutive
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image.
```dockerfile
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Pin versions in It's recommended to pin versions in
ToolsHadolint
Clean up To reduce the image size, delete the
ToolsHadolint
Use Using
ToolsHadolint
**Pin versions in `apt-get install`.**
It's recommended to pin versions in `apt-get install` to ensure consistent builds.
```dockerfile
RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Clean up `apt-get` lists after installation.**
To reduce the image size, delete the `apt-get` lists after installing packages.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Use `--no-install-recommends` to avoid unnecessary packages.**
Using `--no-install-recommends` can help avoid installing additional packages that are not needed.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Multiple consecutive
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Multiple consecutive `RUN` instructions can be consolidated to reduce the number of layers in the Docker image.
```dockerfile
RUN rustup target add wasm32-unknown-unknown && \
cargo install dioxus-cli diesel_cli
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 4-4: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Pin versions in It's recommended to pin versions in
ToolsHadolint
Clean up To reduce the image size, delete the
ToolsHadolint
Use Using
ToolsHadolint
**Pin versions in `apt-get install`.**
It's recommended to pin versions in `apt-get install` to ensure consistent builds.
```dockerfile
RUN apt-get update && apt-get install -y nodejs=12.22.12 npm=6.14.15 supervisor=4.2.2
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Clean up `apt-get` lists after installation.**
To reduce the image size, delete the `apt-get` lists after installing packages.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor && \
rm -rf /var/lib/apt/lists/*
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
---
**Use `--no-install-recommends` to avoid unnecessary packages.**
Using `--no-install-recommends` can help avoid installing additional packages that are not needed.
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm supervisor
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 5-5: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
(DL3008)
---
[info] 5-5: Delete the apt-get lists after installing something
(DL3009)
---
[info] 5-5: Avoid additional packages by specifying `--no-install-recommends`
(DL3015)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Avoid using For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
ToolsHadolint
**Avoid using `USER root` as the last instruction.**
For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
```dockerfile
# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 15-15: Last USER should not be root
(DL3002)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Avoid using For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
ToolsHadolint
**Avoid using `USER root` as the last instruction.**
For security reasons, it's recommended to avoid running containers as the root user. Consider switching to a non-root user.
```dockerfile
# Example: Create a non-root user and switch to it
RUN useradd -ms /bin/bash appuser
USER appuser
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 15-15: Last USER should not be root
(DL3002)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Consolidate the
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Consolidate the `RUN` instructions to reduce the number of layers in the Docker image.
```dockerfile
RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
mkdir -p /.local/share/dioxus
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Consolidate Consolidate the
ToolsHadolint
**Consolidate `RUN` instructions for efficiency.**
Consolidate the `RUN` instructions to reduce the number of layers in the Docker image.
```dockerfile
RUN chown -R 1000:1000 /srv/app /usr/local/cargo /.local/share/dioxus && \
mkdir -p /.local/share/dioxus
```
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[info] 15-15: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 16-16: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
---
[info] 17-17: Multiple consecutive `RUN` instructions. Consider consolidation.
(DL3059)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Use JSON notation for CMD instruction. Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
Committable suggestion
ToolsHadolint
**Use JSON notation for CMD instruction.**
Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
```diff
- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
```
<!-- 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
CMD ["sh", "docker/dev/app/entrypoint.sh"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments
(DL3025)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
![]() Use JSON notation for CMD instruction. Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
Committable suggestion
ToolsHadolint
**Use JSON notation for CMD instruction.**
Using JSON notation for the CMD instruction ensures better handling of arguments and prevents issues related to shell interpretation.
```diff
- CMD sh docker/dev/app/entrypoint.sh
+ CMD ["sh", "docker/dev/app/entrypoint.sh"]
```
<!-- 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
CMD ["sh", "docker/dev/app/entrypoint.sh"]
`````
</details>
<!-- suggestion_end -->
<details>
<summary>Tools</summary>
<details>
<summary>Hadolint</summary><blockquote>
[warning] 23-23: Use arguments JSON notation for CMD and ENTRYPOINT arguments
(DL3025)
</blockquote></details>
</details>
<!-- This is an auto-generated comment by CodeRabbit -->
|
Ensure
.env.dev
is added to.gitignore
The
.env.dev
file is not currently listed in.gitignore
, which means it could be tracked by version control, potentially exposing sensitive information. Please add.env.dev
to.gitignore
to prevent this..env
files:.env
.env.prod
Analysis chain
Be cautious with sensitive information.
Ensure that the
.env.dev
file is not included in version control to prevent exposing sensitive information like database credentials. Consider using a.gitignore
file to exclude it.Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 30
Script:
Length of output: 203