diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8036520 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "web"] + path = web + url = https://git.thehrz.net/thehrz/ipv6-test.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..027f161 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:1.22 as build-stage + +WORKDIR /app +ENV GOPROXY https://goproxy.cn,direct + +COPY . . +RUN go build -o app . + +CMD ["/app/app"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d30e7b1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,30 @@ +version: "3.8" + +networks: + traefik: + name: traefik + external: true + ipv6-test: + name: ipv6-test + +services: + frontend: + build: ./web + container_name: ipv6-test-frontend + restart: always + labels: + - traefik.enable=true + - traefik.http.routers.ipv6-test.rule=Host(`ipv6-test.thehrz.net`) + - traefik.http.routers.ipv6-test.entrypoints=web,websecure + - traefik.http.routers.ipv6-test.tls.certresolver=letsencrypt + - traefik.http.services.ipv6-test.loadbalancer.server.port=3000 + networks: + - traefik + - ipv6-test + backend: + build: . + container_name: ipv6-test-backend + restart: always + networks: + - traefik + - ipv6-test diff --git a/pkg/restyHttp/client.go b/internal/pkg/restyHttp/client.go similarity index 100% rename from pkg/restyHttp/client.go rename to internal/pkg/restyHttp/client.go diff --git a/web b/web new file mode 160000 index 0000000..65b25e7 --- /dev/null +++ b/web @@ -0,0 +1 @@ +Subproject commit 65b25e7ef3883695126228a3f98f3efdab07ef60