Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tests/e2e/reports/

# BitFun sandbox data - auto managed
.bitfun/

.cursor
.cursor/rules/no-cargo.mdc

ASSETS_LICENSES.md
4 changes: 4 additions & 0 deletions src/apps/relay-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ authors.workspace = true
edition.workspace = true
description = "BitFun Relay Server - WebSocket relay for Remote Connect"

[lib]
name = "bitfun_relay_server"
path = "src/lib.rs"

[[bin]]
name = "bitfun-relay-server"
path = "src/main.rs"
Expand Down
14 changes: 10 additions & 4 deletions src/apps/relay-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*

# Copy workspace files
# Copy all workspace Cargo.toml files (including nested path deps in bitfun-core)
COPY Cargo.toml Cargo.lock ./
COPY src/crates/events/Cargo.toml src/crates/events/Cargo.toml
COPY src/crates/core/Cargo.toml src/crates/core/Cargo.toml
COPY src/crates/core/src/infrastructure/ai/ai_stream_handlers/Cargo.toml src/crates/core/src/infrastructure/ai/ai_stream_handlers/Cargo.toml
COPY src/crates/core/src/agentic/tools/implementations/tool-runtime/Cargo.toml src/crates/core/src/agentic/tools/implementations/tool-runtime/Cargo.toml
COPY src/crates/core/src/service/terminal/Cargo.toml src/crates/core/src/service/terminal/Cargo.toml
COPY src/crates/transport/Cargo.toml src/crates/transport/Cargo.toml
COPY src/crates/api-layer/Cargo.toml src/crates/api-layer/Cargo.toml
COPY src/apps/cli/Cargo.toml src/apps/cli/Cargo.toml
Expand All @@ -20,12 +23,16 @@ COPY src/apps/relay-server/Cargo.toml src/apps/relay-server/Cargo.toml
# Create dummy source files for dependency caching
RUN mkdir -p src/crates/events/src && echo "pub fn dummy() {}" > src/crates/events/src/lib.rs && \
mkdir -p src/crates/core/src && echo "pub fn dummy() {}" > src/crates/core/src/lib.rs && \
mkdir -p src/crates/core/src/infrastructure/ai/ai_stream_handlers/src && echo "pub fn dummy() {}" > src/crates/core/src/infrastructure/ai/ai_stream_handlers/src/lib.rs && \
mkdir -p src/crates/core/src/agentic/tools/implementations/tool-runtime/src && echo "pub fn dummy() {}" > src/crates/core/src/agentic/tools/implementations/tool-runtime/src/lib.rs && \
mkdir -p src/crates/core/src/service/terminal/src && echo "pub fn dummy() {}" > src/crates/core/src/service/terminal/src/lib.rs && \
mkdir -p src/crates/transport/src && echo "pub fn dummy() {}" > src/crates/transport/src/lib.rs && \
mkdir -p src/crates/api-layer/src && echo "pub fn dummy() {}" > src/crates/api-layer/src/lib.rs && \
mkdir -p src/apps/cli/src && echo "fn main() {}" > src/apps/cli/src/main.rs && \
mkdir -p src/apps/desktop/src && echo "fn main() {}" > src/apps/desktop/src/main.rs && \
mkdir -p src/apps/server/src && echo "fn main() {}" > src/apps/server/src/main.rs && \
mkdir -p src/apps/relay-server/src && echo "fn main() {}" > src/apps/relay-server/src/main.rs
mkdir -p src/apps/relay-server/src && echo "pub fn dummy() {}" > src/apps/relay-server/src/lib.rs && \
echo "fn main() {}" > src/apps/relay-server/src/main.rs

# Build dependencies only (cached layer)
RUN cargo build --release -p bitfun-relay-server 2>/dev/null || true
Expand All @@ -44,8 +51,7 @@ RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/
WORKDIR /app
COPY --from=builder /build/target/release/bitfun-relay-server /app/bitfun-relay-server

# Optional: copy mobile-web static files
# COPY src/mobile-web/dist /app/static
COPY src/mobile-web/dist /app/static

ENV RELAY_PORT=9700
ENV RELAY_STATIC_DIR=/app/static
Expand Down
33 changes: 0 additions & 33 deletions src/apps/relay-server/deploy/Cargo.toml

This file was deleted.

29 changes: 0 additions & 29 deletions src/apps/relay-server/deploy/Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions src/apps/relay-server/deploy/docker-compose.yml

This file was deleted.

53 changes: 0 additions & 53 deletions src/apps/relay-server/deploy/src/config.rs

This file was deleted.

98 changes: 0 additions & 98 deletions src/apps/relay-server/deploy/src/main.rs

This file was deleted.

5 changes: 0 additions & 5 deletions src/apps/relay-server/deploy/src/relay/mod.rs

This file was deleted.

Loading