Skip to content

Commit fc0affd

Browse files
committed
Mapped adopts gremiln-visualizer
Signed-off-by: Ivan Sabelnikov <[email protected]>
1 parent e7c4f46 commit fc0affd

16 files changed

+27426
-10712
lines changed

Diff for: .github/renovate.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"local>mapped/renovate-config"
5+
]
6+
}

Diff for: .github/workflows/CI.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- README.md
7+
- .github/renovate.json
8+
9+
jobs:
10+
build-docker-push-image:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/[email protected]
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v1
17+
18+
- name: Establish Versioning, Tags, and Labels
19+
id: vtl
20+
uses: mapped/action-vtl@latest
21+
with:
22+
baseVersion: 2.0.0
23+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
24+
dockerImage: docker.io/mapped/gremlin-visualizer
25+
26+
- name: Setup nodejs
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build frontend
35+
run: npm run build
36+
37+
- name: Build backend
38+
run: npx @vercel/ncc build proxy-server.js -o build_proxy
39+
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v1
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v1
45+
46+
- name: Login to DockerHub
47+
uses: docker/login-action@v3
48+
with:
49+
username: ${{ secrets.DOCKERHUB_USERNAME }}
50+
password: ${{ secrets.DOCKERHUB_WRITE_TOKEN }}
51+
52+
- name: Build docker and push
53+
id: docker_build
54+
uses: docker/build-push-action@v2
55+
with:
56+
context: .
57+
platforms: linux/amd64,linux/arm64
58+
file: ./Dockerfile
59+
push: ${{ steps.vtl.outputs.docker_push }}
60+
tags: ${{ steps.vtl.outputs.docker_tags }}
61+
labels: ${{ steps.vtl.outputs.oci_labels }}

Diff for: .github/workflows/remove-old-artifacts.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Remove old artifacts
2+
3+
on:
4+
schedule:
5+
# Every day at 1am
6+
- cron: '0 1 * * *'
7+
8+
jobs:
9+
remove-old-artifacts:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
13+
steps:
14+
- name: Remove old artifacts
15+
uses: c-hive/gha-remove-artifacts@v1
16+
with:
17+
age: '1 day'
18+
skip-recent: 5
19+
skip-tags: true

Diff for: .gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.idea
2-
node_modules
2+
node_modules
3+
package-lock.json
4+
build
5+
build_proxy

Diff for: Dockerfile

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
FROM node:10-alpine
1+
FROM node:20-alpine
22

3-
RUN npm cache clean --force && \
4-
npm config set strict-ssl false && \
5-
apk add wget unzip && \
6-
wget --no-check-certificate https://github.com/prabushitha/gremlin-visualizer/archive/master.zip && \
7-
unzip master.zip && \
8-
cd gremlin-visualizer-master && \
9-
npm install
3+
COPY build /app/frontend
4+
COPY build_proxy /app
105

11-
EXPOSE 3000 3001
6+
WORKDIR /app
127

13-
WORKDIR /gremlin-visualizer-master
8+
EXPOSE 3001
149

15-
CMD npm start
10+
CMD node index.js

Diff for: README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### What is the different in this fork comparing to origin repo
2+
3+
1. Added suppport for different graph names
4+
2. Added GitHub actions to build & push Docker image
5+
3. Added productions mode to host in Kubernetes
6+
4. Added ability to override default values (graph host, port, name) via environement variables
7+
18
# Gremlin-Visualizer
29
This project is to visualize the graph network corresponding to a gremlin query.
310

0 commit comments

Comments
 (0)