Update vpn proxy routing checks
Some checks failed
Build and Deploy Gateway / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy Gateway / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -10,7 +10,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: lxc-111
|
runs-on: lxc-107
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
env:
|
env:
|
||||||
@@ -29,9 +29,21 @@ jobs:
|
|||||||
cd repo
|
cd repo
|
||||||
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
|
REGISTRY_HOST=$(echo "${{ gitea.server_url }}" | sed 's|https\?://||')
|
||||||
IMAGE="${REGISTRY_HOST}/${{ gitea.repository }}/gateway"
|
IMAGE="${REGISTRY_HOST}/${{ gitea.repository }}/gateway"
|
||||||
|
BUILD_PROXY="${BUILD_PROXY:-http://192.168.50.111:8080}"
|
||||||
|
BUILD_NO_PROXY="${BUILD_NO_PROXY:-localhost,127.0.0.1,192.168.50.0/24,192.168.50.109:3000}"
|
||||||
|
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY_HOST" -u "${{ gitea.actor }}" --password-stdin
|
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY_HOST" -u "${{ gitea.actor }}" --password-stdin
|
||||||
docker build -t "${IMAGE}:latest" -t "${IMAGE}:${{ gitea.sha }}" .
|
docker build \
|
||||||
|
--network host \
|
||||||
|
--build-arg HTTP_PROXY="${BUILD_PROXY}" \
|
||||||
|
--build-arg HTTPS_PROXY="${BUILD_PROXY}" \
|
||||||
|
--build-arg NO_PROXY="${BUILD_NO_PROXY}" \
|
||||||
|
--build-arg http_proxy="${BUILD_PROXY}" \
|
||||||
|
--build-arg https_proxy="${BUILD_PROXY}" \
|
||||||
|
--build-arg no_proxy="${BUILD_NO_PROXY}" \
|
||||||
|
-t "${IMAGE}:latest" \
|
||||||
|
-t "${IMAGE}:${{ gitea.sha }}" \
|
||||||
|
.
|
||||||
docker push "${IMAGE}:latest"
|
docker push "${IMAGE}:latest"
|
||||||
docker push "${IMAGE}:${{ gitea.sha }}"
|
docker push "${IMAGE}:${{ gitea.sha }}"
|
||||||
|
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@@ -1,4 +1,10 @@
|
|||||||
FROM node:22-bookworm-slim AS ui-build
|
FROM node:22-bookworm-slim AS ui-build
|
||||||
|
ARG HTTP_PROXY
|
||||||
|
ARG HTTPS_PROXY
|
||||||
|
ARG NO_PROXY
|
||||||
|
ARG http_proxy
|
||||||
|
ARG https_proxy
|
||||||
|
ARG no_proxy
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
@@ -8,6 +14,12 @@ RUN npm run build
|
|||||||
|
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
ARG SINGBOX_VERSION=1.12.13
|
ARG SINGBOX_VERSION=1.12.13
|
||||||
|
ARG HTTP_PROXY
|
||||||
|
ARG HTTPS_PROXY
|
||||||
|
ARG NO_PROXY
|
||||||
|
ARG http_proxy
|
||||||
|
ARG https_proxy
|
||||||
|
ARG no_proxy
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends ca-certificates curl iptables iproute2 nodejs dumb-init \
|
&& apt-get install -y --no-install-recommends ca-certificates curl iptables iproute2 nodejs dumb-init \
|
||||||
|
|||||||
Reference in New Issue
Block a user