Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
30 changes: 30 additions & 0 deletions .gimlet/plugin-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
app: plugin-docs
env: prod
namespace: default
deploy:
branch: master
event: push
chart:
repository: https://chart.onechart.dev
name: onechart
version: 0.64.0
values:
containerPort: 3000
gitRepository: tokens-studio/plugin-docs
gitSha: '{{ .SHA }}'
image:
repository: ghcr.io/tokens-studio/plugin-docs
tag: {{ .SHA }}
imagePullSecrets:
- ghcr-login-secret
ingress:
ingressClassName: traefik
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
networking.gke.io/v1beta1.FrontendConfig: default-frontend-config
host: docs.tokens.studio
path: /
tlsEnabled: true
replicas: 1
resources:
ignoreLimits: true
91 changes: 91 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Publish docker image

on:
push:
branches: [ master]

jobs:
analysis:
name: Analyze
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
# note that we do not want to checkout submodules here
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Import Secrets
id: secrets
uses: hashicorp/vault-action@v2
with:
url: ${{ secrets.VAULT_URL }}
role: sonarqube
method: jwt
namespace: admin
secrets: |
secret/data/cicd/sonarqube/global SONAR_TOKEN |SONAR_TOKEN ;
secret/data/cicd/sonarqube/global SONAR_HOST_URL | SONAR_HOST_URL;
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ steps.secrets.outputs.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ steps.secrets.outputs.SONAR_HOST_URL }}


build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- 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 GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=sha,format=long
images: |
ghcr.io/tokens-studio/plugin-docs

- name: Publish Docker images
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
runs-on: ubuntu-latest
needs:
- "build"
steps:
- uses: actions/checkout@v4
- name: 🍍 Deploy with Gimlet
uses: gimlet-io/gimlet-artifact-shipper-action@v0.8.3
env:
GIMLET_SERVER: ${{ secrets.GIMLET_SERVER }}
GIMLET_TOKEN: ${{ secrets.GIMLET_TOKEN }}
with:
ENV: "prod"
APP: "plugin-docs"
DEPLOY: "true"
16 changes: 16 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Verify changes

on: pull_request

jobs:
verify:
name: Verify changes
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Verify build
run: docker build -t test .
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:18-alpine AS base


# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs

# We should be excluding the public directory here
COPY --chown=nextjs:nodejs ./ /app/

# Build the project
RUN yarn install --frozen-lockfile --immutable
RUN yarn run build
USER nextjs


EXPOSE 3000
ENTRYPOINT [ "yarn","run","start" ]
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Loading