This is an automated email from the ASF dual-hosted git repository.

likeguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new ed3a0286 Support `Contribute with Gitpod`. (#468)
ed3a0286 is described below

commit ed3a02863d42e16cea5fcbe0c517741053cfb4f5
Author: Kerwin Bryant <kerwin...@qq.com>
AuthorDate: Fri Aug 9 10:54:03 2024 +0800

    Support `Contribute with Gitpod`. (#468)
---
 .devcontainer/devcontainer.json | 38 +++++++++++++++++++++++++++++++
 .gitpod.yml                     | 50 +++++++++++++++++++++++++++++++++++++++++
 README.md                       |  1 +
 3 files changed, 89 insertions(+)

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 00000000..0ddefc82
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,38 @@
+{
+  "name": "Shenyu DevContainer",
+  "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+  "features": {
+      "ghcr.io/devcontainers/features/java:1": {
+          "version": "17",
+          "installMaven": "true",
+          "installGradle": "false"
+      },
+      "ghcr.io/devcontainers/features/node:1": {
+          "version": "20"
+      },
+      "ghcr.io/devcontainers/features/git-lfs:1.1.0": {}
+  },
+  "customizations": {
+      "vscode": {
+          "settings": {},
+          // same extensions as Gitpod, should match /.gitpod.yml
+          "extensions": [
+              "vscjava.vscode-java-pack",
+              "editorconfig.editorconfig",
+              "dbaeumer.vscode-eslint",
+              "stylelint.vscode-stylelint",
+              "DavidAnson.vscode-markdownlint",
+              "ms-azuretools.vscode-docker",
+              "cweijan.vscode-database-client2",
+              "GitHub.vscode-pull-request-github"
+          ]
+      }
+  },
+  "portsAttributes": {
+      "8000": {
+          "label": "Shenyu Admin",
+          "onAutoForward": "notify"
+      }
+  },
+  "postCreateCommand": "java -version"
+}
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 00000000..4ec83599
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,50 @@
+additionalRepositories:
+    - url: https://github.com/apache/shenyu.git
+      checkoutLocation: backend
+
+tasks:
+
+    - name: Run backend
+      before: cd ../backend/shenyu-admin
+      command: |
+          gp sync-await setup-backend
+          mvn spring-boot:run
+
+    - name: Run frontend
+      command: |
+          gp sync-await setup-frontend && gp ports await 9095
+          npm start
+      openMode: split-right
+
+    - name: Setup backend
+      before: cd ../backend
+      init: |
+          sdk install java 17.0.11.fx-zulu < /dev/null
+          sdk default java 17.0.11.fx-zulu < /dev/null
+          mvn clean install -DskipTests
+      command: |
+          gp sync-done setup-backend
+          exit 0
+
+    - name: Setup frontend
+      init: |
+          npm install
+      command: |
+          gp sync-done setup-frontend
+          exit 0
+      openMode: split-right
+
+vscode:
+    extensions:
+        - vscjava.vscode-java-pack
+        - editorconfig.editorconfig
+        - dbaeumer.vscode-eslint
+        - stylelint.vscode-stylelint
+        - DavidAnson.vscode-markdownlint
+        - ms-azuretools.vscode-docker
+        - cweijan.vscode-database-client2
+        - GitHub.vscode-pull-request-github
+
+ports:
+    - port: 9095
+      onOpen: ignore
diff --git a/README.md b/README.md
index 29cb82e2..cf74a196 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
 # Apache ShenYu Dashboard
 
 ![build](https://github.com/apache/shenyu-dashboard/workflows/build/badge.svg)
+[![Contribute with 
Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/apache/shenyu-dashboard)
 
 
 ## Overview

Reply via email to