Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rcavaliere authored Nov 27, 2024
0 parents commit a49a6a3
Show file tree
Hide file tree
Showing 21 changed files with 8,679 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
33 changes: 33 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# change version if you want to update your webcomponent
WC_VERSION=0.0.1

# Change port numbers, if they are already in use on your system
# replace 5001, 5002, 5555, 8998 and 8999 with your port numbers
API_SERVER_PORT=5001
CDN_SERVER_PORT=5002
FRONTEND_PORT=8999
APP_PORT=8998
PSQL_PORT=5555

API_URL_TEST=http://api:5001/
API_BASE_URL=http://localhost:5001
API_SWAGGER_BASE_URL=http://localhost:5001

CDN_DIST_URL=http://localhost:5002/dist
CDN_SWAGGER_BASE_URL=http://localhost:5002
CDN_WORKSPACE=/workspace
CDN_ADMINPATH=/workspace
WC_PATH=./webcomponent/

KEYCLOAK_URL_TEST=https://auth.opendatahub.testingmachine.eu/auth/
KEYCLOAK_REALM_TEST=noi
KEYCLOAK_CLIENT_ID_TEST=it.bz.opendatahub.webcomponents.development
# just for local development
KEYCLOAK_CLIENT_SECRET=3f170eea-19e2-43a7-a5cd-9343c6c74b09

## ReCaptcha configuration
# Get it from https://www.google.com/recaptcha/admin/create
# At the moment only v2 keys are supported
RECAPTCHA_PUBLIC_KEY=123key123

DB_URL=jdbc:postgresql://wcstore_postgres/wcs
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI/CD

on:
push:
pull_request:

env:
NODE_VERSION: 16.x


jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
- uses: noi-techpark/github-actions/npm-build@v2
with:
build-command: npm run build
node-version: ${{env.NODE_VERSION}}
- uses: noi-techpark/github-actions/webcomp-test@v2

deploy-test:
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/main'
needs: test
concurrency: deploy-test
steps:
- uses: actions/checkout@v2

- uses: noi-techpark/github-actions/npm-build@v2
with:
build-command: npm run build
node-version: ${{env.NODE_VERSION}}

- uses: noi-techpark/github-actions/webcomp-push@v2
with:
keycloak-secret: ${{secrets.WCSTORE_CLI_KEYCLOAK_SECRET_TEST}}
version-tag: ${{github.sha}}

deploy-prod:
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags/v')
needs: test
concurrency: deploy-prod
steps:
- uses: actions/checkout@v2

- uses: noi-techpark/github-actions/npm-build@v2
with:
build-command: npm run build
node-version: ${{env.NODE_VERSION}}

- uses: noi-techpark/github-actions/webcomp-push@v2
with:
keycloak-secret: ${{secrets.WCSTORE_CLI_KEYCLOAK_SECRET_PROD}}
version-tag: ${{github.ref_name}}
production: "true"
12 changes: 12 additions & 0 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: REUSE Compliance Check

on: push

jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# General
.DS_Store

# Editors
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Project
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.env
dist/
workspace/
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/fsfe/reuse-tool
rev: v1.0.0
hooks:
- id: reuse
8 changes: 8 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: webcomp-boilerplate
Upstream-Contact: NOI Techpark <[email protected]>
Source: https://github.com/noi-techpark/webcomp-boilerplate

Files: .github/* .gitignore LICENSE.md .pre-commit-config.yaml *.json .editorconfig .env.example wcs-logo.png
Copyright: (c) NOI Techpark <[email protected]>
License: CC0-1.0
Loading

0 comments on commit a49a6a3

Please sign in to comment.