diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..793d8e0e --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d38012d3..2c629caa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -116,62 +116,18 @@ jobs: run: | VERSION_TAG=${GITHUB_REF_NAME#v} VERSION_GROUP_TAG=${VERSION_TAG%.*.*} - - docker buildx build \ - -t dpanel/dpanel:lite \ - -t dpanel/dpanel:${VERSION_TAG}-lite \ - -t dpanel/dpanel:${VERSION_GROUP_TAG}-lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:${VERSION_TAG}-lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:${VERSION_GROUP_TAG}-lite \ - --platform linux/arm64,linux/amd64,linux/arm/v7 \ - --build-arg APP_VERSION=${VERSION_TAG} \ - --build-arg APP_FAMILY=ce \ - -f Dockerfile-lite \ - . --push docker buildx build \ -t dpanel/dpanel:latest \ -t dpanel/dpanel:${VERSION_TAG} \ -t dpanel/dpanel:${VERSION_GROUP_TAG} \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:latest \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:${VERSION_TAG} \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:${VERSION_GROUP_TAG} \ - --platform linux/arm64,linux/amd64,linux/arm/v7 \ + -t dpanel:latest \ + -t dpanel:${VERSION_TAG} \ + -t dpanel:${VERSION_GROUP_TAG} \ + --platform linux/arm64,linux/amd64 \ --build-arg APP_VERSION=${VERSION_TAG} \ --build-arg APP_FAMILY=ce \ . --push - - # pe - - docker buildx build \ - -t dpanel/dpanel:pe-lite \ - -t dpanel/dpanel-pe:lite \ - -t dpanel/dpanel-pe:${VERSION_TAG}-lite \ - -t dpanel/dpanel-pe:${VERSION_GROUP_TAG}-lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:pe-lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel-pe:lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel-pe:${VERSION_TAG}-lite \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel-pe:${VERSION_GROUP_TAG}-lite \ - --platform linux/arm64,linux/amd64,linux/arm/v7 \ - --build-arg APP_VERSION=${VERSION_TAG} \ - --build-arg APP_FAMILY=pe \ - -f Dockerfile-lite \ - . --push - - docker buildx build \ - -t dpanel/dpanel:pe-latest \ - -t dpanel/dpanel-pe:latest \ - -t dpanel/dpanel-pe:${VERSION_TAG} \ - -t dpanel/dpanel-pe:${VERSION_GROUP_TAG} \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel:pe-latest \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel-pe:latest \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel-pe:${VERSION_TAG} \ - -t registry.cn-hangzhou.aliyuncs.com/dpanel/dpanel-pe:${VERSION_GROUP_TAG} \ - --platform linux/arm64,linux/amd64,linux/arm/v7 \ - --build-arg APP_VERSION=${VERSION_TAG} \ - --build-arg APP_FAMILY=pe \ - . --push - name: upload artifact uses: softprops/action-gh-release@v2 diff --git a/Dockerfile b/Dockerfile index 52bbc977..08ac08f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,5 +38,6 @@ VOLUME [ "/dpanel" ] EXPOSE 443 EXPOSE 80 EXPOSE 8080 +EXPOSE 22 ENTRYPOINT [ "/docker/entrypoint.sh" ] \ No newline at end of file diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 20fe807b..90f1eb4d 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -58,4 +58,5 @@ http { include /dpanel/nginx/redirection_host/*.conf; include /dpanel/nginx/dead_host/*.conf; include /dpanel/nginx/temp/*.conf; -} \ No newline at end of file +} +include /dpanel/nginx/stream/*.conf;