-
Notifications
You must be signed in to change notification settings - Fork 30
chore: import wavefront client and server #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
08f61d8
17143dd
d8d3ab2
3148eb9
4e762fe
4610e9c
5dffccc
ea78b75
832546b
03b2bee
c6d626b
1d6c03b
7013ec5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| **/*/node_modules | ||
| **/*/dist | ||
| **/*/.git | ||
| **/*/.github | ||
| **/*/.gitignore | ||
| **/*/.env | ||
| **/*/.env.staging | ||
| **/*/.env.production | ||
| **/*/.prettierrc.json | ||
| **/*/eslint.config.js | ||
| **/*/.husky | ||
| **/*/.vscode | ||
| **/*/.yarn | ||
| **/*/.yarnrc | ||
| .yarnrc.yml | ||
| README.md | ||
| extras |
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,69 @@ | |||||||||||||||||||||||
| name: (Develop) Build and Push Wavefront Web app to AWS and GCP | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| on: | |||||||||||||||||||||||
| workflow_dispatch: | |||||||||||||||||||||||
| push: | |||||||||||||||||||||||
| branches: | |||||||||||||||||||||||
| - wavefront | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| env: | |||||||||||||||||||||||
| PROJECT_ID: aesy-330511 | |||||||||||||||||||||||
| GCP_REGION: asia-south1 | |||||||||||||||||||||||
| GAR_LOCATION: asia-south1-docker.pkg.dev/aesy-330511/root-hub | |||||||||||||||||||||||
| IMAGE_NAME: wavefront-web | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||
| build-push-artifact: | |||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| steps: | |||||||||||||||||||||||
| - name: "Checkout" | |||||||||||||||||||||||
| uses: "actions/checkout@v3" | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Get commit hash | |||||||||||||||||||||||
| id: get-commit-hash | |||||||||||||||||||||||
| run: echo "::set-output name=commit-hash::$(git rev-parse --short HEAD)" | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Get timestamp | |||||||||||||||||||||||
| id: get-timestamp | |||||||||||||||||||||||
| run: echo "::set-output name=timestamp::$(date +'%Y-%m-%d-%H-%M')" | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Cache Docker layers | |||||||||||||||||||||||
| id: cache-docker-layers | |||||||||||||||||||||||
| uses: actions/cache@v3 | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| path: /tmp/.buildx-cache | |||||||||||||||||||||||
| key: ${{ runner.os }}-docker-${{ github.sha }} | |||||||||||||||||||||||
| restore-keys: | | |||||||||||||||||||||||
| ${{ runner.os }}-docker- | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Set up Docker Buildx | |||||||||||||||||||||||
| uses: docker/setup-buildx-action@v3 | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Build Docker Image | |||||||||||||||||||||||
| id: build-image | |||||||||||||||||||||||
| run: | | |||||||||||||||||||||||
| docker build -f wavefront/client/Dockerfile -t rootflo:${{ steps.get-commit-hash.outputs.commit-hash }}-${{ steps.get-timestamp.outputs.timestamp }} . | |||||||||||||||||||||||
| echo "IMAGE_TAG=${{ steps.get-commit-hash.outputs.commit-hash }}-${{ steps.get-timestamp.outputs.timestamp }}" >> $GITHUB_ENV | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - id: "Auth-to-GCP" | |||||||||||||||||||||||
| uses: "google-github-actions/auth@v1" | |||||||||||||||||||||||
| with: | |||||||||||||||||||||||
| credentials_json: "${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}" | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: "Set up Cloud SDK" | |||||||||||||||||||||||
| uses: "google-github-actions/setup-gcloud@v1" | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: "Docker auth for GCP" | |||||||||||||||||||||||
| run: |- | |||||||||||||||||||||||
| gcloud auth configure-docker ${{ env.GCP_REGION }}-docker.pkg.dev --quiet | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Tag and push image to GCP Artifact Registry | |||||||||||||||||||||||
| run: | | |||||||||||||||||||||||
| docker tag rootflo:${{ env.IMAGE_TAG }} ${{ env.GAR_LOCATION }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | |||||||||||||||||||||||
| docker push ${{ env.GAR_LOCATION }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | |||||||||||||||||||||||
|
|
|||||||||||||||||||||||
| - name: Cleanup Docker images | |||||||||||||||||||||||
| run: | | |||||||||||||||||||||||
| docker rmi rootflo:${{ env.IMAGE_TAG }} || true | |||||||||||||||||||||||
| docker rmi ${{ env.GAR_LOCATION }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} || true | |||||||||||||||||||||||
|
Comment on lines
+17
to
+69
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 5 months ago To fix the problem, you should add a
Suggested changeset
1
.github/workflows/build-wavefront-web-develop.yaml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| FROM python:3.11-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ | ||
|
|
||
| RUN apt-get update && apt-get install -y \ | ||
| libpq-dev \ | ||
| gcc \ | ||
| libgl1 \ | ||
| libglib2.0-0 \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY pyproject.toml uv.lock ./ | ||
|
|
||
| COPY modules/auth_module /app/modules/auth_module | ||
| COPY modules/common_module /app/modules/common_module | ||
| COPY modules/db_repo_module /app/modules/db_repo_module | ||
| COPY modules/gold_module /app/modules/gold_module | ||
| COPY modules/insights_module /app/modules/insights_module | ||
| COPY modules/knowledge_base_module /app/modules/knowledge_base_module | ||
| COPY modules/user_management_module /app/modules/user_management_module | ||
| COPY modules/llm_inference_config_module /app/modules/llm_inference_config_module | ||
| COPY modules/agents_module /app/modules/agents_module | ||
| COPY modules/plugins_module/ /app/modules/plugins_module | ||
| COPY modules/product_analysis_module /app/modules/product_analysis_module | ||
| COPY modules/inference_module /app/modules/inference_module | ||
| COPY modules/image_search_module /app/modules/image_search_module | ||
| COPY modules/tools_module /app/modules/tools_module | ||
| COPY modules/voice_agents_module /app/modules/voice_agents_module | ||
| COPY modules/api_services_module /app/modules/api_services_module | ||
|
|
||
| COPY packages/flo_cloud /app/packages/flo_cloud | ||
| COPY packages/flo_utils /app/packages/flo_utils | ||
|
|
||
| COPY plugins/datasource /app/plugins/datasource | ||
| COPY plugins/authenticator /app/plugins/authenticator | ||
|
|
||
| COPY apps/floware /app/apps/floware | ||
|
|
||
| RUN uv sync --package floware --frozen --no-dev | ||
|
|
||
| WORKDIR /app/apps/floware/floware | ||
|
|
||
| CMD ["uv", "run", "server.py"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| VITE_BASE_URL=http://localhost:8002/floconsole | ||
| VITE_APP_ENV=production | ||
| VITE_FEATURE_API_SERVICES=true | ||
|
|
||
| # NOTE: Add the new variables to the /config endpoint in the server.cjs file(For docker) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| ARG PNPM_VERSION=pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad | ||
|
|
||
| FROM node:22-alpine AS deps | ||
| WORKDIR /app | ||
|
|
||
| RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} | ||
|
|
||
| COPY wavefront/client/pnpm-lock.yaml wavefront/client/pnpm-workspace.yaml ./ | ||
| COPY wavefront/client/package.json ./ | ||
|
|
||
| RUN pnpm install | ||
|
|
||
| FROM node:22-alpine AS build | ||
| WORKDIR /app | ||
|
|
||
| RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} | ||
|
|
||
| COPY --from=deps /app/node_modules ./node_modules | ||
| COPY --from=deps /app/pnpm-workspace.yaml ./ | ||
| COPY --from=deps /app/package.json ./ | ||
|
|
||
| COPY wavefront/client/ ./ | ||
|
|
||
| RUN pnpm build | ||
|
vishnurk6247 marked this conversation as resolved.
|
||
|
|
||
| FROM node:22-alpine | ||
| WORKDIR /app | ||
|
|
||
| RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} | ||
|
|
||
| COPY --from=build /app/dist ./dist | ||
| COPY --from=build /app/server.cjs ./ | ||
| RUN pnpm install express@4.21.2 compression@^1.8.0 | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| CMD ["node", "server.cjs"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # React + TypeScript + Vite | ||
|
|
||
| This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
|
||
| Currently, two official plugins are available: | ||
|
|
||
| - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
| - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
|
|
||
| ## Expanding the ESLint configuration | ||
|
|
||
| If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: | ||
|
|
||
| ```js | ||
| export default tseslint.config({ | ||
| extends: [ | ||
| // Remove ...tseslint.configs.recommended and replace with this | ||
| ...tseslint.configs.recommendedTypeChecked, | ||
| // Alternatively, use this for stricter rules | ||
| ...tseslint.configs.strictTypeChecked, | ||
| // Optionally, add this for stylistic rules | ||
| ...tseslint.configs.stylisticTypeChecked, | ||
| ], | ||
| languageOptions: { | ||
| // other options... | ||
| parserOptions: { | ||
| project: ['./tsconfig.node.json', './tsconfig.app.json'], | ||
| tsconfigRootDir: import.meta.dirname, | ||
| }, | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: | ||
|
|
||
| ```js | ||
| // eslint.config.js | ||
| import reactX from 'eslint-plugin-react-x'; | ||
| import reactDom from 'eslint-plugin-react-dom'; | ||
|
|
||
| export default tseslint.config({ | ||
| plugins: { | ||
| // Add the react-x and react-dom plugins | ||
| 'react-x': reactX, | ||
| 'react-dom': reactDom, | ||
| }, | ||
| rules: { | ||
| // other rules... | ||
| // Enable its recommended typescript rules | ||
| ...reactX.configs['recommended-typescript'].rules, | ||
| ...reactDom.configs.recommended.rules, | ||
| }, | ||
| }); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "$schema": "https://ui.shadcn.com/schema.json", | ||
| "style": "new-york", | ||
| "rsc": false, | ||
| "tsx": true, | ||
| "tailwind": { | ||
| "config": "tailwind.config.js", | ||
| "css": "src/index.css", | ||
| "baseColor": "neutral", | ||
| "cssVariables": true, | ||
| "prefix": "" | ||
| }, | ||
| "iconLibrary": "lucide", | ||
| "aliases": { | ||
| "components": "@app/components", | ||
| "utils": "@app/lib/utils", | ||
| "ui": "@app/components/ui", | ||
| "lib": "@app/lib", | ||
| "hooks": "@app/hooks" | ||
| }, | ||
| "registries": {} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import js from '@eslint/js'; | ||
| import globals from 'globals'; | ||
| import reactHooks from 'eslint-plugin-react-hooks'; | ||
| import reactRefresh from 'eslint-plugin-react-refresh'; | ||
| import tseslint from 'typescript-eslint'; | ||
| import prettier from 'eslint-plugin-prettier'; | ||
|
|
||
| export default tseslint.config( | ||
| { ignores: ['dist'] }, | ||
| { | ||
| extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
| files: ['**/*.{ts,tsx}'], | ||
| languageOptions: { | ||
| ecmaVersion: 2020, | ||
| globals: globals.browser, | ||
| }, | ||
| plugins: { | ||
| 'react-hooks': reactHooks, | ||
| 'react-refresh': reactRefresh, | ||
| prettier: prettier, | ||
| }, | ||
| rules: { | ||
| ...reactHooks.configs.recommended.rules, | ||
| 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], | ||
| 'prettier/prettier': 'error', | ||
| }, | ||
| } | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
|
|
||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/png" href="/favicon.png" /> | ||
| <link rel="preload" as="image" href="/background.webp" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <script src="/config.js"></script> | ||
| <title>Rootflo Console</title> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
|
|
||
| </html> |
Uh oh!
There was an error while loading. Please reload this page.