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
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Build stage
FROM rust:alpine3.20 AS builder

# Install build dependencies
RUN apk add --no-cache musl-dev

# Set the working directory
WORKDIR /app

# Copy the project files
# Build vproxy
COPY . .

# Build the project
RUN cargo build --release

# Build bore from source
RUN cargo install bore-cli

# Runtime stage
FROM alpine:3.16

# Copy the built binary from the builder stage
COPY --from=builder /app/target/release/vproxy /bin/vproxy

# Iproute2 and procps are needed for the vproxy to work
RUN apk add --no-cache iproute2 procps

# Set the entrypoint
ENTRYPOINT ["/bin/vproxy"]
# Copy binaries
COPY --from=builder /app/target/release/vproxy /usr/local/bin/vproxy
COPY --from=builder /usr/local/cargo/bin/bore /usr/local/bin/bore

EXPOSE 9090

# Run vproxy and bore tunnel
CMD sh -c 'vproxy run --bind 0.0.0.0:9090 http & bore local 9090 --to bore.pub'
6 changes: 6 additions & 0 deletions koyeb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build:
docker:
dockerfile: Dockerfile
run:
command: /bin/vproxy run --bind 0.0.0.0:9090 http
port: 9090