Skip to content

Commit

Permalink
dockerfile (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre Hanot <>
  • Loading branch information
Almaju authored Nov 13, 2023
1 parent 9b5b42c commit 10d595b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM rust:slim-bookworm

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

# Install trunk
RUN cargo install --locked trunk

# Copy the source code into the container
COPY . .

# Build the application using Trunk
WORKDIR /applications/web

# Expose the port
EXPOSE 8080

# Start a server and serve static files
CMD [ "trunk", "serve" ]

6 changes: 5 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
dev:
(cd applications/web && trunk serve)


build:
docker build -t todolist .

start:
docker run -p 8080:8080 todolist
5 changes: 5 additions & 0 deletions applications/web/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[watch]
# Paths to watch. The `build.target`'s parent folder is watched by default.
watch = [
"../../drivers/ui/src",
"../../interactions/src",
]

[serve]
# The address to serve on.
address = "0.0.0.0"

0 comments on commit 10d595b

Please sign in to comment.