Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 74 additions & 11 deletions Cargo.lock

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

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ serde_json = "1.0.107"
thiserror = "1.0.50"
tokio = "1"

jwst = { workspace = true, path = "libs/jwst" }
jwst-codec = { workspace = true, path = "libs/jwst-codec" }
jwst-core = { workspace = true, path = "libs/jwst-core" }
jwst-logger = { workspace = true, path = "libs/jwst-logger" }
jwst-rpc = { workspace = true, path = "libs/jwst-rpc" }
jwst-storage = { workspace = true, path = "libs/jwst-storage" }
jwst-codec = { path = "libs/jwst-codec" }
jwst-core = { path = "libs/jwst-core" }
jwst-logger = { path = "libs/jwst-logger" }
jwst-rpc = { path = "libs/jwst-rpc" }
jwst-storage = { path = "libs/jwst-storage" }

[profile.release]
lto = true
Expand Down
6 changes: 6 additions & 0 deletions apps/keck/.env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# The block observation webhook endpoint
# HOOK_ENDPOINT=

# Redis URL for multi-node synchronization
# REDIS_URL=redis://127.0.0.1:6379

# Node ID for multi-node setup (optional, auto-generated if not provided)
# NODE_ID=
3 changes: 3 additions & 0 deletions apps/keck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ reqwest = { version = "0.11.19", default-features = false, features = [
"json",
"rustls-tls",
] }
redis = { version = "0.23.3", features = ["tokio-comp", "connection-manager"] }

# ======= workspace dependencies =======
anyhow = { workspace = true }
chrono = { workspace = true }
futures = { workspace = true }
nanoid = { workspace = true }
rand = { workspace = true }
Expand All @@ -60,6 +62,7 @@ serde_json = { workspace = true }
thiserror = { workspace = true }

jwst-core = { workspace = true, features = ["large_refs"] }
jwst-codec = { workspace = true }
jwst-logger = { workspace = true }
jwst-rpc = { workspace = true }
jwst-storage = { workspace = true }
Expand Down
41 changes: 41 additions & 0 deletions apps/keck/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Build stage
FROM rust:1.75-bullseye as builder

WORKDIR /app

# Copy the workspace configuration
COPY Cargo.toml Cargo.lock ./
COPY apps/keck/Cargo.toml ./apps/keck/
COPY libs/ ./libs/

# Copy source code
COPY apps/keck/src/ ./apps/keck/src/

# Build the application
RUN cargo build --release -p keck

# Runtime stage
FROM debian:bullseye-slim

# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Create app user
RUN useradd -m -u 1001 keck

# Copy the binary
COPY --from=builder /app/target/release/keck /usr/local/bin/keck

# Set ownership
RUN chown keck:keck /usr/local/bin/keck

# Switch to app user
USER keck

# Expose port
EXPOSE 3000

# Run the application
CMD ["keck"]
Loading