diff --git a/.gitea/workflows/build-docker-beta.yaml b/.gitea/workflows/build-docker-beta.yaml deleted file mode 100644 index c6d3d35d8..000000000 --- a/.gitea/workflows/build-docker-beta.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: Build docker image beta - -on: - push: - tags: - - 'beta-*' - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: ${{ vars.REGISTRY_URL }} - cache: 'pnpm' - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{ vars.DOCKERHUB_URL }} - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Extract and format tag name - id: extract_tag - run: echo version=`echo "${{ gitea.ref }}" | cut -d'/' -f3` >> "$GITHUB_OUTPUT" - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - file: docker/tachybase/Dockerfile - push: true - # not work now https://github.com/go-gitea/gitea/pull/29584 wait for gitea 1.23.0 - # cache-from: type=gha - # cache-to: type=gha,mode=max - build-args: | - TACHYBASE_VERSION=${{ steps.extract_tag.outputs.version }} - NPM_REGISTRY=${{ vars.REGISTRY_URL }} - tags: | - ${{ vars.DOCKERHUB_URL }}/tachybase/tachybase:${{ steps.extract_tag.outputs.version }} - ${{ vars.DOCKERHUB_URL }}/tachybase/tachybase:beta-latest diff --git a/.gitea/workflows/build-docker.yaml b/.gitea/workflows/build-docker.yaml index e6dd400d5..d673531ec 100644 --- a/.gitea/workflows/build-docker.yaml +++ b/.gitea/workflows/build-docker.yaml @@ -1,39 +1,22 @@ -name: Build docker image +name: build release image on: push: tags: - - 'v*' + - 'release-*' jobs: - publish_npm_packages: + docker: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 20 registry-url: ${{ vars.REGISTRY_URL }} cache: 'pnpm' - - name: Install deps - run: pnpm install - - name: Build - run: pnpm build:p - - name: Publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPMTOKEN }} - run: pnpm -r publish --access=public --no-git-checks --publish-branch ${{ gitea.ref }} - - docker: - runs-on: ubuntu-latest - needs: publish_npm_packages - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub @@ -44,12 +27,16 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Extract and format tag name id: extract_tag - run: echo version=`echo "${{ gitea.ref }}" | cut -d'/' -f3 | sed 's/^v//'` >> "$GITHUB_OUTPUT" + run: echo version=`echo "${{ gitea.ref }}" | cut -d'/' -f3` >> "$GITHUB_OUTPUT" - name: Build and push uses: docker/build-push-action@v5 with: context: . + file: docker/tachybase/Dockerfile push: true + # not work now https://github.com/go-gitea/gitea/pull/29584 wait for gitea 1.23.0 + # cache-from: type=gha + # cache-to: type=gha,mode=max build-args: | TACHYBASE_VERSION=${{ steps.extract_tag.outputs.version }} NPM_REGISTRY=${{ vars.REGISTRY_URL }} diff --git a/docker/nocobase/docker-entrypoint.sh b/docker/nocobase/docker-entrypoint.sh deleted file mode 100755 index 227118b6f..000000000 --- a/docker/nocobase/docker-entrypoint.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -set -e - -if [ ! -d "/app/nocobase" ]; then - mkdir nocobase -fi - -if [ ! -f "/app/nocobase/package.json" ]; then - echo 'copying...' - tar -zxf /app/nocobase.tar.gz --absolute-names -C /app/nocobase - touch /app/nocobase/node_modules/@nocobase/app/dist/client/index.html -fi - -cd /app/nocobase && pnpm tachybase create-nginx-conf -rm -rf /etc/nginx/sites-enabled/nocobase.conf -ln -s /app/nocobase/storage/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf - -nginx -echo 'nginx started'; - -if [ -z "$PM2_INSTANCE_NUM" ]; then - PM2_INSTANCE_NUM=1 -fi -cd /app/nocobase && pnpm start --quickstart -i $PM2_INSTANCE_NUM - -# Run command with node if the first argument contains a "-" or is not a system command. The last -# part inside the "{}" is a workaround for the following bug in ash/dash: -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then - set -- node "$@" -fi - -exec "$@" diff --git a/docker/nocobase/nocobase.conf b/docker/nocobase/nocobase.conf deleted file mode 100644 index d462e5be6..000000000 --- a/docker/nocobase/nocobase.conf +++ /dev/null @@ -1,89 +0,0 @@ -log_format apm '"$time_local" client=$remote_addr ' - 'method=$request_method request="$request" ' - 'request_length=$request_length ' - 'status=$status bytes_sent=$bytes_sent ' - 'body_bytes_sent=$body_bytes_sent ' - 'referer=$http_referer ' - 'user_agent="$http_user_agent" ' - 'upstream_addr=$upstream_addr ' - 'upstream_status=$upstream_status ' - 'request_time=$request_time ' - 'upstream_response_time=$upstream_response_time ' - 'upstream_connect_time=$upstream_connect_time ' - 'upstream_header_time=$upstream_header_time'; - -server { - listen 80; - server_name _; - root /app/nocobase/node_modules/@nocobase/app/dist/client; - index index.html; - client_max_body_size 1000M; - access_log /var/log/nginx/nocobase.log apm; - - gzip on; - gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; - - # 不缓存 HTML 文件 - location ~ \.html$ { - if_modified_since off; - expires off; - etag off; - } - - # 缓存 JavaScript 和 CSS 文件 - location ~* \.(js|css)$ { - expires 365d; - add_header Cache-Control "public"; - } - - location /storage/uploads/ { - alias /app/nocobase/storage/uploads/; - add_header Cache-Control "public"; - access_log off; - autoindex off; - } - - location / { - root /app/nocobase/node_modules/@nocobase/app/dist/client; - try_files $uri $uri/ /index.html; - add_header Last-Modified $date_gmt; - add_header Cache-Control 'no-store, no-cache'; - if_modified_since off; - expires off; - etag off; - } - - location ^~ /api/ { - proxy_pass http://127.0.0.1:13000/api/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - proxy_connect_timeout 600; - proxy_send_timeout 600; - proxy_read_timeout 600; - send_timeout 600; - } - - location ^~ /static/plugins/ { - proxy_pass http://127.0.0.1:13000/static/plugins/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - proxy_connect_timeout 600; - proxy_send_timeout 600; - proxy_read_timeout 600; - send_timeout 600; - } - - location /ws { - proxy_pass http://127.0.0.1:13000/ws; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; - } -} diff --git a/packages/plugins/@hera/plugin-core/src/client/index.tsx b/packages/plugins/@hera/plugin-core/src/client/index.tsx index 7fb815a2f..90c4ebd14 100644 --- a/packages/plugins/@hera/plugin-core/src/client/index.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/index.tsx @@ -86,7 +86,7 @@ export class PluginCoreClient extends Plugin { await this.app.pm.add(PluginPDF); await this.app.pm.add(PluginExtendedFilterForm); await this.app.pm.add(PluginOutbound); - await this.app.pm.add(PluginModeHighlight); + // await this.app.pm.add(PluginModeHighlight); } async registerSettings() {