Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
target/
dist/
.git/
.github/
*.md
!README.md
.env
.env.*
!.env.production
node_modules/
.DS_Store
*.log
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ web-sys = { version = "0.3", features = [
"IdbTransactionMode",
"IdbIndex",
"IdbKeyRange",
"DomStringList",
] }

# Serialization
Expand Down
50 changes: 50 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Multi-stage Dockerfile for VBStack Dioxus/WASM build

# Stage 1: Build environment
FROM rust:1.75-slim as builder

# Install dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Install wasm32 target
RUN rustup target add wasm32-unknown-unknown

# Install Dioxus CLI
RUN cargo install dioxus-cli

# Set working directory
WORKDIR /app

# Copy manifests
COPY Cargo.toml Cargo.lock ./
COPY Dioxus.toml ./

# Copy source code
COPY src ./src
COPY assets ./assets
COPY public ./public
COPY index.html ./
COPY tailwind.config.js ./

# Build the project for release
RUN dx build --release

# Stage 2: Runtime environment (nginx to serve static files)
FROM nginx:alpine

# Copy built files from builder
COPY --from=builder /app/dist /usr/share/nginx/html

# Copy nginx configuration if needed
# COPY nginx.conf /etc/nginx/nginx.conf

# Expose port 80
EXPOSE 80

# Start nginx
CMD ["nginx", "-g", "daemon off;"]
Loading
Loading