Add docker compose #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths-ignore: | |
- README.md | |
- .github/renovate.json | |
jobs: | |
build-docker-push-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Establish Versioning, Tags, and Labels | |
id: vtl | |
uses: mapped/action-vtl@latest | |
with: | |
baseVersion: 1.0.0 | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
dockerImage: docker.io/janusgraph/janusgraph-visualizer | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build frontend | |
run: npm run build | |
- name: Build backend | |
run: npx @vercel/ncc build proxy-server.js -o build_proxy | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build docker and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
file: ./Dockerfile | |
push: ${{ steps.vtl.outputs.docker_push }} | |
tags: ${{ steps.vtl.outputs.docker_tags }} | |
labels: ${{ steps.vtl.outputs.oci_labels }} |