Skip to content

Commit

Permalink
fix: try to fix deps again
Browse files Browse the repository at this point in the history
  • Loading branch information
voznik committed May 20, 2024
1 parent 6fba1db commit a5c6642
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 145 deletions.
180 changes: 60 additions & 120 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ ralertsinua-models = { path = "ralertsinua-models", version = "0.5.1" }
ralertsinua-geo = { path = "ralertsinua-geo", version = "0.5.1", features = [
"tui",
] }
# [target.'cfg(not(target_env = "musl"))'.dependencies] # FIXME: how do we change dependencies based on target?
ralertsinua-http = { path = "ralertsinua-http", version = "0.5.1", default-features = false, features = [
ralertsinua-http = { path = "ralertsinua-http", version = "0.5.1", features = [
"cache",
"reqwest-native-tls",
] }

async-trait = "0.1.80"
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ FROM raonigabriel/web-terminal
RUN apk add --no-cache curl

ENV RELEASE_URL=https://github.com/voiceapiai/ralertsinua/releases/latest/download/ralertsinua-x86_64-unknown-linux-musl.tar.xz
ENV TTYD_SILENT=true

WORKDIR /home/ralertsinua


# Install the latest musl version of ralertsinua
RUN curl -L --proto '=https' --tlsv1.2 -sSf "$RELEASE_URL" | tar -xvJf -
RUN find . -type f -name 'ralertsinua' -exec mv {} /usr/local/bin/ \;
ADD $RELEASE_URL ralertsinua.tar.xz
RUN tar -xvJf ralertsinua.tar.xz && \
find . -type f -name 'ralertsinua' -exec mv {} /usr/local/bin/ \; && \
rm ralertsinua.tar.xz

HEALTHCHECK CMD ["ralertsinua", "--help"]

CMD [ "ttyd", "-s", "3", "-t", "titleFixed=Rust alerts.in.ua TUI - ralertsinua", "-t", "rendererType=webgl", "-t", "disableLeaveAlert=true", "ralertsinua" ]
RUN [ "ralertsinua" ]
CMD [ "ttyd", "-q", "-s", "3", "-t", "titleFixed=Rust alerts.in.ua TUI - ralertsinua", "-t", "rendererType=webgl", "-t", "disableLeaveAlert=true" ]

# TODO: https://github.com/colinmurphy1/docker-ttyd/blob/main/entrypoint.sh
11 changes: 3 additions & 8 deletions ralertsinua-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,18 @@ bytes = "1.6.0"
http = "1.1.0"
miette = { version = "7.2.0", features = [] }
log = "0.4.21"
reqwest = { version = "0.12", default-features = false, features = [
"json",
"socks",
], optional = true }
reqwest = { version = "0.12", features = ["json"] } # default-features = false # https://github.com/seanmonstar/reqwest/issues/495
serde = { version = "1.0.198", features = ["derive"] }
serde_json = "1.0.116"
thiserror = "1.0"
quick_cache = { version = "0.5", default-features = false, optional = true }

[features]
default = ["reqwest-native-tls", "cache"]
default = ["cache"]

cache = ["quick_cache"]

# Passing the TLS features to reqwest.
reqwest-rustls-tls = ["reqwest/rustls-tls"]
reqwest-native-tls = ["reqwest/native-tls"]
# rustls-tls = ["reqwest/rustls-tls"]

[dev-dependencies]
mockall = "0.12.1"
Expand Down
7 changes: 0 additions & 7 deletions ralertsinua-http/build.rs

This file was deleted.

Loading

0 comments on commit a5c6642

Please sign in to comment.