From cc8ed4bd4c07437b980a6ea583c6fc5c4efbd547 Mon Sep 17 00:00:00 2001 From: Filip Kojro Date: Fri, 25 Sep 2026 22:58:23 +0200 Subject: [PATCH] dockerfile for server --- Dockerfile | 8 ++++++++ README.md | 41 ++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..859c9b2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM rust:alpine as builder +WORKDIR /usr/src/smalltalk +COPY . . +RUN cargo build -p server --release + +FROM alpine:latest +COPY --from=builder /usr/src/smalltalk/target/release/server /usr/local/bin/smalltalk +CMD ["smalltalk"] diff --git a/README.md b/README.md index b79dac3..1b526dc 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,17 @@ # smalltalk -## build and run client +## running server -Usage: +### using docker ```bash -cargo run -p client --release -- --server-ip +docker build -t smalltalk . +docker run -d --rm -p 6767:6767/tcp -p 6767:6767/udp --name smalltalk smalltalk ``` -Options: +### using cargo -``` --s, --server-ip --h, --help Print help --V, --version Print version -``` - -## build and run server - -before, open port `8080` tcp/udp +before, open port `6767` tcp and udp Usage: @@ -29,17 +22,23 @@ cargo run -p server --release -- [OPTIONS] Options: ``` --s, --server-ip [default: 0.0.0.0:8080] +-s, --server-ip [default: 0.0.0.0:6767] -h, --help Print help -V, --version Print version ``` ---- +## build and run client -I think it will be based on: +Usage: -- `tokio`: async and network connection -- `cpal`: raw audio input and output -- `opus`: encoding and decoding audio stream -- `ffmpeg-next`: capturing, encoding and decoding video stream -- `egui` + `eframe`: ui +```bash +cargo run -p client --release -- --server-ip +``` + +Options: +``` +-c, --connect-with-defaults +-s, --server-ip +-h, --help Print help +-V, --version Print version +```