Compare commits
3 Commits
49665b3a3f
...
fix/docker
| Author | SHA1 | Date | |
|---|---|---|---|
|
d2e7f4dad1
|
|||
|
32c12186c1
|
|||
|
2f933d5302
|
2
.github/workflows/rust-check.yaml
vendored
2
.github/workflows/rust-check.yaml
vendored
@@ -35,6 +35,8 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: .env symlink creation
|
- name: .env symlink creation
|
||||||
run: ln -s .env.dev .env
|
run: ln -s .env.dev .env
|
||||||
|
- name: Tailwind CSS output creation
|
||||||
|
run: touch assets/tailwind.css
|
||||||
- name: rustfmt check
|
- name: rustfmt check
|
||||||
run: cargo fmt --all --check
|
run: cargo fmt --all --check
|
||||||
- name: Clippy check
|
- name: Clippy check
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ RUN useradd -m -u 1000 -s /bin/bash app_user \
|
|||||||
|
|
||||||
USER app_user
|
USER app_user
|
||||||
|
|
||||||
RUN cargo install --git https://github.com/diesel-rs/diesel --rev 2e85ba060d3d70ea605ea58a79b8a435749a7adc diesel_cli \
|
RUN cargo install --git https://github.com/diesel-rs/diesel --rev 2e85ba060d3d70ea605ea58a79b8a435749a7adc --locked diesel_cli \
|
||||||
&& cargo install --git https://github.com/DioxusLabs/dioxus --rev 8f8b58ea80ba0ec8057807bcd58fb609f7a5f2b1 dioxus-cli
|
&& cargo install --git https://github.com/DioxusLabs/dioxus --rev 8f8b58ea80ba0ec8057807bcd58fb609f7a5f2b1 --locked dioxus-cli
|
||||||
|
|
||||||
COPY --chown=app_user . /srv/app
|
COPY --chown=app_user . /srv/app
|
||||||
WORKDIR /srv/app
|
WORKDIR /srv/app
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ ARG ANDROID_BUNDLETOOL_VERSION=1.18.3
|
|||||||
ARG ANDROID_BUNDLETOOL_SHA256=a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29
|
ARG ANDROID_BUNDLETOOL_SHA256=a099cfa1543f55593bc2ed16a70a7c67fe54b1747bb7301f37fdfd6d91028e29
|
||||||
ENV ANDROID_SDK_ROOT=/opt/android-sdk
|
ENV ANDROID_SDK_ROOT=/opt/android-sdk
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
openjdk-17-jdk-headless=17.0.17+10-1~deb12u1 \
|
openjdk-17-jdk-headless=17.0.17+10-1~deb12u1 \
|
||||||
&& curl -fsSL -o /tmp/cmdline-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_COMMAND_LINE_TOOLS_VERSION}_latest.zip" \
|
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& cargo install --git https://github.com/diesel-rs/diesel --rev 2e85ba060d3d70ea605ea58a79b8a435749a7adc diesel_cli \
|
&& cargo install --git https://github.com/diesel-rs/diesel --rev 2e85ba060d3d70ea605ea58a79b8a435749a7adc --locked diesel_cli \
|
||||||
&& cargo install --git https://github.com/DioxusLabs/dioxus --rev 8f8b58ea80ba0ec8057807bcd58fb609f7a5f2b1 dioxus-cli --features disable-telemetry \
|
&& cargo install --git https://github.com/DioxusLabs/dioxus --rev 8f8b58ea80ba0ec8057807bcd58fb609f7a5f2b1 --locked dioxus-cli --features disable-telemetry \
|
||||||
&& rustup target add aarch64-linux-android \
|
&& rustup target add aarch64-linux-android \
|
||||||
&& mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools" \
|
&& mkdir -p "$ANDROID_SDK_ROOT/cmdline-tools" \
|
||||||
&& curl -fsSL -o /tmp/cmdline-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_COMMAND_LINE_TOOLS_VERSION}_latest.zip" \
|
&& curl -fsSL -o /tmp/cmdline-tools.zip "https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_COMMAND_LINE_TOOLS_VERSION}_latest.zip" \
|
||||||
@@ -23,7 +24,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
&& export PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/platform-tools:$PATH" \
|
&& export PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/platform-tools:$PATH" \
|
||||||
&& mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest" \
|
&& mv "$ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest" \
|
||||||
&& rm /tmp/cmdline-tools.zip \
|
&& rm /tmp/cmdline-tools.zip \
|
||||||
&& yes | sdkmanager --sdk_root="$ANDROID_SDK_ROOT" --licenses > /dev/null \
|
# `yes` can exit with 141, which is okay, so the `test` is added to ignore it.
|
||||||
|
&& yes | sdkmanager --sdk_root="$ANDROID_SDK_ROOT" --licenses > /dev/null; test "${PIPESTATUS[1]}" -eq 0 \
|
||||||
&& sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "platform-tools" "platforms;android-$ANDROID_VERSION" "build-tools;$ANDROID_BUILD_TOOLS_VERSION" "ndk;$ANDROID_NDK_VERSION" \
|
&& sdkmanager --sdk_root="$ANDROID_SDK_ROOT" "platform-tools" "platforms;android-$ANDROID_VERSION" "build-tools;$ANDROID_BUILD_TOOLS_VERSION" "ndk;$ANDROID_NDK_VERSION" \
|
||||||
&& curl -fsSL -o /tmp/bundletool-all.jar "https://github.com/google/bundletool/releases/download/$ANDROID_BUNDLETOOL_VERSION/bundletool-all-${ANDROID_BUNDLETOOL_VERSION}.jar" \
|
&& curl -fsSL -o /tmp/bundletool-all.jar "https://github.com/google/bundletool/releases/download/$ANDROID_BUNDLETOOL_VERSION/bundletool-all-${ANDROID_BUNDLETOOL_VERSION}.jar" \
|
||||||
&& echo "$ANDROID_BUNDLETOOL_SHA256 /tmp/bundletool-all.jar" | sha256sum -c - \
|
&& echo "$ANDROID_BUNDLETOOL_SHA256 /tmp/bundletool-all.jar" | sha256sum -c - \
|
||||||
|
|||||||
@@ -46,8 +46,15 @@ mod server_only {
|
|||||||
let mut disconnected_client_ids = HashSet::new();
|
let mut disconnected_client_ids = HashSet::new();
|
||||||
let subscribed_clients = SUBSCRIBED_CLIENTS.read().await;
|
let subscribed_clients = SUBSCRIBED_CLIENTS.read().await;
|
||||||
for (id, client) in subscribed_clients.iter() {
|
for (id, client) in subscribed_clients.iter() {
|
||||||
if let Err(_) = client.websocket.lock().await.send(UpdateEvent).await {
|
if client
|
||||||
disconnected_client_ids.insert(id.clone());
|
.websocket
|
||||||
|
.lock()
|
||||||
|
.await
|
||||||
|
.send(UpdateEvent)
|
||||||
|
.await
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
|
disconnected_client_ids.insert(*id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
drop(subscribed_clients);
|
drop(subscribed_clients);
|
||||||
|
|||||||
Reference in New Issue
Block a user