Changed listener to all adresses

This commit is contained in:
xeovalyte 2024-06-21 10:13:52 +02:00
parent 713f40783e
commit c8d46a02b7
Signed by: xeovalyte
SSH Key Fingerprint: SHA256:kSQDrQDmKzljJzfGYcd3m9RqHi4h8rSwkZ3sQ9kBURo
3 changed files with 33 additions and 2 deletions

View File

@ -77,7 +77,7 @@ style-file = "style/main.scss"
assets-dir = "public"
# The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup.
site-addr = "127.0.0.1:3000"
site-addr = "0.0.0.0:3000"
# The port to use for automatic reload monitoring
reload-port = 3001

31
application/Dockerfile Normal file
View File

@ -0,0 +1,31 @@
# Get started with a build env with Rust nightly
FROM rustlang/rust:nightly-alpine as builder
RUN apk update && \
apk add --no-cache bash curl npm libc-dev binaryen
RUN npm install -g sass
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/leptos-rs/cargo-leptos/releases/latest/download/cargo-leptos-installer.sh | sh
# Add the WASM target
RUN rustup target add wasm32-unknown-unknown
WORKDIR /work
COPY . .
RUN cargo leptos build --release -vv
FROM rustlang/rust:nightly-alpine as runner
WORKDIR /app
COPY --from=builder /work/target/release/leptos_start /app/
COPY --from=builder /work/target/site /app/site
COPY --from=builder /work/Cargo.toml /app/
EXPOSE $PORT
ENV LEPTOS_SITE_ROOT=./site
CMD ["/app/leptos_start"]

View File

@ -9,7 +9,7 @@ pub fn init_websocket() {
ready_state,
message,
..
} = use_websocket("ws://localhost:3000/ws");
} = use_websocket("ws://192.168.100.122:3000/ws");
provide_context(ready_state);