diff --git a/Dockerfile b/Dockerfile index cbadf96..2f512b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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' diff --git a/koyeb.yaml b/koyeb.yaml new file mode 100644 index 0000000..b8b4394 --- /dev/null +++ b/koyeb.yaml @@ -0,0 +1,6 @@ +build: + docker: + dockerfile: Dockerfile +run: + command: /bin/vproxy run --bind 0.0.0.0:9090 http + port: 9090