Skip to content

Commit

Permalink
Merge pull request #1 from nofusscomputing/genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-nfc authored Nov 10, 2024
2 parents e5fc241 + 7b3a186 commit 0848e40
Show file tree
Hide file tree
Showing 121 changed files with 33,562 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
build
docs
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BROWSER=none
7 changes: 7 additions & 0 deletions .github/additional_actions_bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

set -e

sed -E 's#"version": "(.+)"#"version: "'${NEW_VERSION}'"#g' -i package.json

sed -E 's#"version": "(.+)"#"version: "'${NEW_VERSION}'"#g' -i package-lock.json
41 changes: 41 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
### :books: Summary
<!-- your summary here emojis ref: https://github.com/yodamad/gitlab-emoji -->



### :link: Links / References
<!--
using a list as any links to other references or links as required. if relevent, describe the link/reference
Include any issues or related merge requests. Note: dependent MR's also to be added to "Merge request dependencies"
-->



### :construction_worker: Tasks

- [ ] Add your tasks here as required (delete task if n/a)

<!-- dont remove tasks below strike through including the checkbox by enclosing in double tidle '~~' -->

- [ ] :orange_circle: Related issue(s) closed via [commit message](https://www.conventionalcommits.org/en/v1.0.0) footer

- [ ] :firecracker: Contains `breaking-change` Any Breaking change(s)? [commit message](https://www.conventionalcommits.org/en/v1.0.0)

_Breaking Change must also be notated in the commit that introduces it and in [Conventional Commit Format](https://www.conventionalcommits.org/en/v1.0.0/)._

- [ ] :notebook: Release notes updated

- [ ] :blue_book: Documentation written

_All features to be documented within the correct section(s). Administration, Development and/or User_

- [ ] :checkered_flag: Milestone assigned

- [ ] :test_tube: [Unit Test(s) Written](https://nofusscomputing.com/projects/centurion_erp/development/testing/)

_ensure test coverage delta is not less than zero_

- [ ] :page_facing_up: Roadmap updated
31 changes: 31 additions & 0 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---

name: 'Bump'


on:
workflow_dispatch:
inputs:
CZ_PRE_RELEASE:
default: none
required: false
description: Create Pre-Release {alpha,beta,rc,none}
CZ_INCREMENT:
default: none
required: false
description: Type of bump to conduct {MAJOR,MINOR,PATCH,none}
push:
branches:
- 'master'


jobs:

bump:
name: 'Bump'
uses: nofusscomputing/action_bump/.github/workflows/bump.yaml@development
with:
CZ_PRE_RELEASE: ${{ inputs.CZ_PRE_RELEASE }}
CZ_INCREMENT: ${{ inputs.CZ_INCREMENT }}
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
97 changes: 97 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---

name: 'CI'


on:
push:
branches:
- '**'
tags:
- '*'

env:
GIT_SYNC_URL: "https://${{ secrets.GITLAB_USERNAME_ROBOT }}:${{ secrets.GITLAB_TOKEN_ROBOT }}@gitlab.com/nofusscomputing/projects/centurion_erp_ui.git"

jobs:



docker:
name: 'Docker'
uses: nofusscomputing/action_docker/.github/workflows/docker.yaml@development
with:
DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/centurion-erp-ui"
DOCKER_PUBLISH_REGISTRY: "docker.io"
DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/centurion-erp-ui"
secrets:
DOCKER_PUBLISH_USERNAME: ${{ secrets.NFC_DOCKERHUB_USERNAME }}
DOCKER_PUBLISH_PASSWORD: ${{ secrets.NFC_DOCKERHUB_TOKEN }}


mkdocs:
name: 'MKDocs'
permissions:
pull-requests: write
contents: write
statuses: write
checks: write
actions: write
uses: nofusscomputing/action_mkdocs/.github/workflows/reusable_mkdocs.yaml@development



gitlab-mirror:
if: ${{ github.repository == 'nofusscomputing/centurion_erp_ui' }}
runs-on: ubuntu-latest
steps:

- name: Checks
shell: bash
run: |
if [ "0${{ env.GIT_SYNC_URL }}" == "0" ]; then
echo "[ERROR] you must define variable GIT_SYNC_URL for mirroring this repository.";
exit 1;
fi
- name: clone
shell: bash
run: |
git clone --mirror https://github.com/${{ github.repository }} repo;
ls -la repo/
- name: add remote
shell: bash
run: |
cd repo;
echo "**************************************** - git remote -v";
git remote -v;
echo "****************************************";
git remote add destination $GIT_SYNC_URL;
- name: push branches
shell: bash
run: |
cd repo;
echo "**************************************** - git branch";
git branch;
echo "****************************************";
git push destination --mirror || true;
14 changes: 14 additions & 0 deletions .github/workflows/pull-requests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---

name: Pull Requests


on:
pull_request: {}


jobs:

pull-request:
name: pull-request
uses: nofusscomputing/action_pull_requests/.github/workflows/pull-requests.yaml@development
37 changes: 37 additions & 0 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

---

name: Triage


on:
issues:
types:
- opened
- reopened
- transferred
- milestoned
- demilestoned
- closed
- assigned
pull_request:
types:
- opened
- edited
- assigned
- reopened
- closed



jobs:


project:
name: Project
uses: nofusscomputing/action_project/.github/workflows/project.yaml@development
with:
PROJECT_URL: https://github.com/orgs/nofusscomputing/projects/3
secrets:
WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}

25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

**.tmp.*
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "website-template"]
path = website-template
url = https://gitlab.com/nofusscomputing/infrastructure/website-template.git
branch = development
[submodule "gitlab-ci"]
path = gitlab-ci
url = https://gitlab.com/nofusscomputing/projects/gitlab-ci.git
branch = development
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"orta.vscode-jest",
"eg2.vscode-npm-script",
"burkeholland.simple-react-snippets"
]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "chrome",
"request": "launch",
"name": "React",
"url": "http://127.0.0.1:3000/",
"webRoot": "${workspaceFolder}/src",
"trace": true,
"runtimeArgs": [
"--enable-chrome-browser-cloud-management"
]
}
]
}
74 changes: 74 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
ARG CI_PROJECT_URL=''
ARG CI_COMMIT_SHA=''
ARG CI_COMMIT_TAG=''

ARG ALPINE_VERSION=3.20
ARG NGINX_VERSION=1.27.2
ARG NODE_VERSION=22.11.0


FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} as build


COPY . /workdir


WORKDIR /workdir


RUN npm install; \
npm remove babel-preset-react-app; \
npm run build




FROM nginx:${NGINX_VERSION}-alpine${ALPINE_VERSION}-slim


LABEL \
org.opencontainers.image.vendor="No Fuss Computing" \
org.opencontainers.image.title="Centurion ERP UI" \
org.opencontainers.image.description="A react UI for Centurion ERP" \
org.opencontainers.image.vendor="No Fuss Computing" \
io.artifacthub.package.license="MIT"


ARG CI_PROJECT_URL
ARG CI_COMMIT_SHA
ARG CI_COMMIT_TAG


ENV CI_PROJECT_URL=${CI_PROJECT_URL}
ENV CI_COMMIT_SHA=${CI_COMMIT_SHA}
ENV CI_COMMIT_TAG=${CI_COMMIT_TAG}

ENV API_URL=__API_URL__


COPY --from=build /workdir/build/ /usr/share/nginx/html/


COPY includes/ /

RUN apk update --no-cache; \
apk upgrade --no-cache; \
apk add --no-cache \
supervisor; \
rm -f /etc/supervisord.conf; \
chmod +x /entrypoint.sh


WORKDIR /var/log


EXPOSE 80

VOLUME [ "/var/log" ]


HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD \
supervisorctl status || exit 1


ENTRYPOINT [ "/entrypoint.sh" ]
Empty file added docs/articles/index.md
Empty file.
Empty file added docs/contact.md
Empty file.
Empty file added docs/index.md
Empty file.
Empty file added docs/operations/index.md
Empty file.
Empty file.
Empty file.
Loading

0 comments on commit 0848e40

Please sign in to comment.