From 1afda73923d358ec8070e1a754ff44474ca6a317 Mon Sep 17 00:00:00 2001 From: hexlocation Date: Tue, 17 Dec 2024 22:11:33 +0100 Subject: [PATCH] yay --- .woodpecker.yaml | 18 ++++++++++++++++++ Dockerfile | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .woodpecker.yaml diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..7e0e16f --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,18 @@ +when: + branch: ["main"] + event: ["push", "manual"] +steps: + - name: build + image: woodpeckerci/plugin-docker-buildx + settings: + repo: git.iwakura.rip/hex/wstunnel + platforms: linux/amd64 + dockerfile: Dockerfile + tags: + ["${CI_COMMIT_BRANCH}-latest", "${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"] + username: hex + registry: + git.iwakura.rip + #insecure: true + password: + from_secret: gitpat diff --git a/Dockerfile b/Dockerfile index 54eed2f..1d83e9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,12 +52,13 @@ ARG PROFILE=release COPY --from=builder_release /build/target/${PROFILE}/wstunnel wstunnel ENV RUST_LOG="INFO" -ENV SERVER_PROTOCOL="wss" +ENV SERVER_PROTOCOL="ws" ENV SERVER_LISTEN="[::]" ENV SERVER_PORT="8080" +ENV EXTRA_ARGS="--restrict-to 192.168.2.1:19110" EXPOSE 8080 USER app ENTRYPOINT ["/usr/bin/dumb-init", "-v", "--"] -CMD ["/bin/sh", "-c", "exec /home/app/wstunnel server ${SERVER_PROTOCOL}://${SERVER_LISTEN}:${SERVER_PORT}"] +CMD ["/bin/sh", "-c", "exec /home/app/wstunnel server ${EXTRA_ARGS} ${SERVER_PROTOCOL}://${SERVER_LISTEN}:${SERVER_PORT}"]