-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
PSPDFKit
authored and
PSPDFKit
committed
Feb 29, 2024
0 parents
commit 1c9b271
Showing
91 changed files
with
3,862 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["master"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: 'repository/' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DS_Store | ||
|
||
*.Secret.yaml | ||
*.yaml.swp | ||
Chart.lock | ||
|
||
#*.tgz | ||
#index.yaml | ||
charts/*/charts |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
The PSPDFKit Sample applications are licensed with a modified BSD | ||
license. In plain language: you're allowed to do whatever you wish | ||
with the code, modify, redistribute, embed in your products (free or | ||
commercial), but you must include copyright, terms of usage and | ||
disclaimer as stated in the license. | ||
|
||
You will require a commercial PSPDFKit License to run these examples | ||
in non-demo mode. Please refer to [email protected] for details. | ||
|
||
Copyright © 2018-present PSPDFKit GmbH. | ||
All rights reserved. | ||
|
||
Redistribution and use in source or binary forms, | ||
with or without modification, are permitted provided | ||
that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the | ||
distribution. | ||
|
||
- Redistributions of PSPDFKit Samples must include attribution to | ||
PSPDFKit, either in documentation or other appropriate media. | ||
|
||
- Neither the name of the PSPDFKit, PSPDFKit GmbH, nor its developers | ||
may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# PSPDFKit Helm Charts | ||
|
||
## Using this repository | ||
|
||
``` | ||
helm repo add pspdfkit https://pspdfkit.github.io/helm-charts | ||
helm repo update | ||
``` | ||
|
||
## Installing PDPDFKit tools | ||
|
||
### Document Engine | ||
|
||
``` | ||
helm upgrade --install --debug --dry-run \ | ||
processor pspdfkit/document-engine \ | ||
-n pspdfkit-services \ | ||
-f ./document-engine-values.yaml | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!templates/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v2 | ||
name: document-engine | ||
description: PSPDFKit Document Engine | ||
icon: data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwMCIgaGVpZ2h0PSIxMDAwIiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMzQyLjU2NyA2NTguNjEyTDMyOS40OTYgNjY1LjkxNUwzMzguNzk5IDY1NC4yODZDMzk5LjMxIDU3OS44NDIgNDMzLjAyNiA0ODcuMjExIDQzNC41MjggMzkxLjI4OEw0MzQuNzYgMzc2LjMxTDQ0MC4xMSAzOTAuMjY1QzQ3NC40MDUgNDc5LjkzMiA1MzcuODc4IDU1NS40NDggNjIwLjMxIDYwNC42NTRMNjMzLjE0OCA2MTIuMzI5TDYxOC4zNTYgNjA5Ljk1N0M1MjMuNTcxIDU5NC43NTYgNDI2LjQyOCA2MTEuODk0IDM0Mi41NjcgNjU4LjYxMloiIGZpbGw9IiMxOTBEOTQiLz4KPHBhdGggZD0iTTU1NC41MTkgNTU2LjM2N0M0NzMuMzk2IDQ0Mi4wMzMgNDg3LjMwNCAzNzYuODY1IDUwOS44NjQgMjg5Ljc4OEM1MzYuNjExIDE4Ni41MjQgNDczLjM1IDg0LjA1MDUgMzYyLjU5NyAxMTQuNDI1QzMxMy41MjMgMTI3LjkxNCAyOTYuMTczIDE2MS4zMTIgMjkwLjAzMyAxODQuNzU2QzI1OS45ODQgMjk3Ljc4OSA0MzguMjMxIDQ2Ni4xNzQgNTU0LjUxOSA1NTYuMzY3WiIgZmlsbD0iIzVFNUNFQiIvPgo8cGF0aCBkPSJNMjE3LjEwMyA2NDQuMTg2QzExNC4zMDQgNjcyLjY1NCA1Ny4xODM1IDc3OC43NTUgMTM4Ljg2NSA4NTkuNDEzQzE3NS4wNTMgODk1LjEzNyAyMTIuNjM4IDg5My40NjIgMjM2LjAzNSA4ODcuMzIyQzM0OC45MjggODU2Ljc2MiA0MDUuNjMgNjE4LjE4NCA0MjUuNjMyIDQ3Mi40MDVDMzY3LjE2MiA1OTkuNjI1IDMwMy45OTQgNjIwLjE4NCAyMTcuMTAzIDY0NC4xODZaIiBmaWxsPSIjNUU1Q0VCIi8+CjxwYXRoIGQ9Ik04NzEuNDggNTgyLjY1MUM3ODguNTQzIDUwMC4xNzkgNTUzLjU5NCA1NzAuMzI0IDQxNy4zNSA2MjUuOTFDNTU2Ljg5NiA2MTIuODM5IDYwNi4zODkgNjU3LjQ0OCA2NzAuNTMzIDcyMC41MjJDNzQ2LjU4NiA3OTUuMzE5IDg2Ni45NjggNzkxLjczNyA4OTYuMDQgNjgwLjY1OUM5MDguNjkyIDYzMS40NDUgODg4LjQ1OCA1OTkuNzIyIDg3MS40OCA1ODIuNjUxWiIgZmlsbD0iIzVFNUNFQiIvPgo8L3N2Zz4K | ||
type: application | ||
version: 1.0.2 | ||
appVersion: "1.0.0" | ||
|
||
dependencies: | ||
- name: postgresql | ||
version: 14.1.3 | ||
repository: https://charts.bitnami.com/bitnami | ||
condition: postgresql.enabled |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
The PSPDFKit Sample applications are licensed with a modified BSD | ||
license. In plain language: you're allowed to do whatever you wish | ||
with the code, modify, redistribute, embed in your products (free or | ||
commercial), but you must include copyright, terms of usage and | ||
disclaimer as stated in the license. | ||
|
||
You will require a commercial PSPDFKit License to run these examples | ||
in non-demo mode. Please refer to [email protected] for details. | ||
|
||
Copyright © 2018-present PSPDFKit GmbH. | ||
All rights reserved. | ||
|
||
Redistribution and use in source or binary forms, | ||
with or without modification, are permitted provided | ||
that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the | ||
distribution. | ||
|
||
- Redistributions of PSPDFKit Samples must include attribution to | ||
PSPDFKit, either in documentation or other appropriate media. | ||
|
||
- Neither the name of the PSPDFKit, PSPDFKit GmbH, nor its developers | ||
may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "document-engine.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "document-engine.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "document-engine.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "document-engine.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT | ||
{{- end }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "document-engine.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "document-engine.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "document-engine.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "document-engine.labels" -}} | ||
helm.sh/chart: {{ include "document-engine.chart" . }} | ||
{{ include "document-engine.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "document-engine.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "document-engine.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "document-engine.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "document-engine.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
License secret name | ||
*/}} | ||
{{- define "document-engine.license.secret.name" -}} | ||
{{- if not .Values.pspdfkit.license.externalSecret.name -}} | ||
{{- printf "%s-license" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.license.externalSecret.name -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "document-engine.license.secret.key" -}} | ||
{{- if not .Values.pspdfkit.license.externalSecret.name -}} | ||
ACTIVATION_KEY | ||
{{- else -}} | ||
{{- .Values.pspdfkit.license.externalSecret.key -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
API and dashboard secrets | ||
*/}} | ||
{{- define "document-engine.api.secret.name" -}} | ||
{{- if (eq .Values.pspdfkit.auth.api.createSecret true) -}} | ||
{{- printf "%s-api-auth" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.auth.api.externalSecretName -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "document-engine.dashboard.secret.name" -}} | ||
{{- if (eq .Values.pspdfkit.auth.dashboard.createSecret true) -}} | ||
{{- printf "%s-dashboard-auth" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.auth.dashboard.externalSecretName -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Database secrets | ||
*/}} | ||
{{- define "document-engine.storage.postgres.secret.name" -}} | ||
{{- if (eq .Values.pspdfkit.storage.postgres.auth.createSecret true) -}} | ||
{{- printf "%s-db-postgres" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.storage.postgres.auth.externalSecretName -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "document-engine.storage.postgres.adminSecret.name" -}} | ||
{{- if (eq .Values.pspdfkit.storage.postgres.auth.createSecret true) -}} | ||
{{- printf "%s-db-postgres-admin" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.storage.postgres.auth.externalAdminSecretName -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "document-engine.storage.redis.secret.name" -}} | ||
{{- if (eq .Values.pspdfkit.storage.redis.auth.createSecret true) -}} | ||
{{- printf "%s-redis" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.storage.redis.auth.externalSecretName -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Object storage parameters | ||
*/}} | ||
{{- define "document-engine.s3.enabled" -}} | ||
{{- if .Values.pspdfkit.storage.assetStorageBackend -}} | ||
{{- with .Values.pspdfkit.storage.assetStorageBackend -}} | ||
{{- if eq . "s3" -}} | ||
{{- true -}} | ||
{{- else -}} | ||
{{- false -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- else -}} | ||
{{- false -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "document-engine.s3.createSecret" -}} | ||
{{- if and (eq (include "document-engine.s3.enabled" .) "true") (not .Values.pspdfkit.storage.s3.auth.externalSecretName) -}} | ||
{{- true -}} | ||
{{- else -}} | ||
{{- false -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "document-engine.s3.secretName" -}} | ||
{{- if (eq (include "document-engine.s3.createSecret" .) "true") -}} | ||
{{- printf "%s-s3" (include "document-engine.fullname" .) -}} | ||
{{- else -}} | ||
{{- .Values.pspdfkit.storage.s3.auth.externalSecretName -}} | ||
{{- end -}} | ||
{{- end -}} |
Oops, something went wrong.