Compare commits
8 Commits
8d8b461774
...
0.1.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
414678befd | ||
|
|
7fa831ca13 | ||
|
|
8f8c724f5f | ||
|
|
01c3ceb76d | ||
|
|
5ce21498e5 | ||
| a54d1f3c3b | |||
|
|
081229d66a | ||
| 837e19e111 |
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
**/target
|
||||
**/dist
|
||||
LICENSES
|
||||
LICENSE
|
||||
temp
|
||||
README.md
|
||||
374
Cargo.lock
generated
374
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
48
Dockerfile
48
Dockerfile
@@ -1,21 +1,33 @@
|
||||
FROM rust:1.84.0 AS dioxus
|
||||
RUN cargo install dioxus-cli@^0.6
|
||||
FROM rust:1 AS chef
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR /app
|
||||
|
||||
FROM dioxus AS builder
|
||||
WORKDIR /athome/
|
||||
RUN apt-get update && apt install libwebkit2gtk-4.1-dev build-essential curl npm \
|
||||
wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev -y\
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN npm install -D tailwindcss
|
||||
COPY ./Cargo.toml ./Cargo.toml
|
||||
COPY ./Dioxus.toml ./Dioxus.toml
|
||||
COPY ./input.css ./input.css
|
||||
COPY ./tailwind.config.js ./tailwind.config.js
|
||||
COPY ./src/ ./src/
|
||||
COPY ./assets/ ./assets/
|
||||
FROM chef AS planner
|
||||
COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
RUN cargo chef cook --release --recipe-path recipe.json
|
||||
COPY . .
|
||||
|
||||
# Install `dx`
|
||||
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
RUN cargo binstall dioxus-cli --root /.cargo -y --force
|
||||
ENV PATH="/.cargo/bin:$PATH"
|
||||
|
||||
# Create the final bundle folder. Bundle always executes in release mode with optimizations enabled
|
||||
RUN dx bundle --platform web
|
||||
|
||||
FROM dioxus AS runner
|
||||
WORKDIR /app/
|
||||
COPY --from=builder /athome/target/dx/athome/release/web/ ./
|
||||
CMD [ "./server" ]
|
||||
FROM chef AS runtime
|
||||
COPY --from=builder /app/target/dx/athome/release/web/ /usr/local/app
|
||||
|
||||
# set our port and make sure to listen for all connections
|
||||
ENV PORT=8080
|
||||
ENV IP=0.0.0.0
|
||||
|
||||
# expose the port 8080
|
||||
EXPOSE 8080
|
||||
|
||||
WORKDIR /usr/local/app
|
||||
ENTRYPOINT [ "/usr/local/app/server" ]
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,3 +1,6 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@tailwind utilities;
|
||||
|
||||
@custom-variant dark (&:where(.dark, .dark *));
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ use header::Header;
|
||||
pub fn Layout() -> Element {
|
||||
rsx! {
|
||||
div {
|
||||
class: "flex flex-col min-h-screen",
|
||||
class: "dark flex flex-col min-h-screen",
|
||||
Header {},
|
||||
Body {
|
||||
Outlet::<Route> {},
|
||||
|
||||
17
src/main.rs
17
src/main.rs
@@ -61,7 +61,6 @@ fn App() -> Element {
|
||||
rsx! {
|
||||
document::Link { rel: "stylesheet", href: asset!("./assets/tailwind.css") }
|
||||
document::Link { rel: "icon", href: asset!("./assets/favicon.ico") }
|
||||
// <link rel="icon" type="image/x-icon" href="/images/favicon.ico">
|
||||
meta {
|
||||
name: "description",
|
||||
content: "Visit Tuan-Dat Tran's website for his CV, publications, projects, and consulting services. Connect for collaboration.",
|
||||
@@ -81,22 +80,6 @@ fn App() -> Element {
|
||||
}}
|
||||
"
|
||||
}
|
||||
// meta {
|
||||
// property: "og:title",
|
||||
// content: "Tuan-Dat Trans Personal Website",
|
||||
// }
|
||||
// meta {
|
||||
// property: "og:description",
|
||||
// content: "Explore Tuan-Dat Tran's personal website featuring his CV, publications, projects, and consulting services. Get insights into his professional journey and connect for collaboration opportunities.",
|
||||
// }
|
||||
// meta {
|
||||
// property: "og:image",
|
||||
// content: "https://www.tudattr.dev/pictures/headshot.webp",
|
||||
// }
|
||||
// meta {
|
||||
// property: "og:url",
|
||||
// content: "https://tudattr.dev",
|
||||
// }
|
||||
div {
|
||||
class: "bg-white dark:bg-gray-900 min-h-screen",
|
||||
Router::<Route> {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_i18n::t;
|
||||
|
||||
use crate::components::{Bolding, UnderConstruction, H1, HR};
|
||||
use crate::components::{Bolding, H1, HR};
|
||||
|
||||
#[component]
|
||||
pub fn PublicationsProjects() -> Element {
|
||||
|
||||
Reference in New Issue
Block a user