Skip to content

Commit

Permalink
ADD proxy request
Browse files Browse the repository at this point in the history
  • Loading branch information
synoet committed May 5, 2024
1 parent f86c57a commit ede00e5
Show file tree
Hide file tree
Showing 7 changed files with 6,707 additions and 33 deletions.
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ services:

theia-proxy:
image: registry.digitalocean.com/anubis/theia-proxy:${GIT_TAG:-latest}
build: ./theia/proxy
build: ./theia/proxy-rs

theia-init:
image: registry.digitalocean.com/anubis/theia-init:${GIT_TAG:-latest}
Expand Down
172 changes: 172 additions & 0 deletions theia/proxy-rs/Cargo.lock

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

9 changes: 7 additions & 2 deletions theia/proxy-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ edition = "2021"

[dependencies]
anyhow = "1.0.82"
axum = "0.7.5"
axum = { version = "0.7.5", features = ["ws"] }
axum-extra = { version = "0.9.3", features = ["cookie"] }
hyper = "1.3.1"
hyper-util = { version = "0.1.3", features = ["tokio"] }
jsonwebtoken = "9.3.0"
lazy_static = "1.4.0"
serde = "1.0.200"
sqlx = { version = "0.7.4", features = ["mysql"] }
sqlx = { version = "0.7.4", features = ["mysql", "runtime-tokio"] }
tokio = { version = "1.37.0", features = ["rt-multi-thread"] }
tower-http = { version = "0.5.2", features = ["trace"] }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
23 changes: 23 additions & 0 deletions theia/proxy-rs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM rust:latest as builder

WORKDIR /usr/src/app

COPY . .

RUN cargo build --release

FROM debian:bookworm

RUN apt-get update && apt-get install -y openssl libssl-dev ca-certificates

RUN useradd -ms /bin/bash app

WORKDIR /app

COPY --from=builder /usr/src/app/target/release/proxy-rs /app/proxy-rs

EXPOSE 5000

USER app

CMD ["./proxy-rs"]
Loading

0 comments on commit ede00e5

Please sign in to comment.