Skip to content
Open
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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dockerfile itself not needed inside build
Dockerfile

# Docs & licenses
LICENSE
README.md
doc/

# Nix and CI
deploy.nix
flake.nix
flake.lock

# Linter config
clippy.toml

# Optional: scripts not needed for build
fix-links.sh

# Optional: task runner
justfile
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apt-get update && \
npm && \
rm -rf /var/lib/apt/lists/*

# Install Rust and the wasm32 target
# Install Rust and wasm32 target
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
Expand All @@ -38,8 +38,8 @@ WORKDIR /app
COPY . .

# Build the application
RUN trunk build --release && \
sh fix-links.sh
RUN rustup target add wasm32-unknown-unknown
RUN trunk build --release

# Stage 2: Final Image
# This stage creates a minimal image to serve the built static files.
Expand All @@ -50,4 +50,4 @@ COPY --from=builder /app/dist /usr/share/nginx/html

# Expose port 80 and start Nginx
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
8 changes: 8 additions & 0 deletions Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
# target = "wasm32-unknown-unknown"
release = true
dist = "dist"
public-url = "/"

[watch]
ignore = ["node_modules"]