37 Commits
Author SHA1 Message Date
Benjamin Wilson 627a75ad8d Delete CNAME 2024-02-11 21:17:04 -05:00
benjamin-wilson 4ba5230cfb deploy: 069a3a2af2 2024-01-26 14:13:40 +00:00
benjamin-wilson 9a001c1ee1 deploy: 38b01c6dcc 2024-01-04 15:36:04 +00:00
benjamin-wilson a278148c5a deploy: 913ff61c83 2023-12-13 02:41:16 +00:00
benjamin-wilson 612e7df02d deploy: d989bb8921 2023-12-10 15:30:29 +00:00
benjamin-wilson 0ae410d5c0 deploy: 463fc9b676 2023-12-04 14:00:12 +00:00
benjamin-wilson 60c10703f8 deploy: 00a2871c50 2023-11-27 03:54:08 +00:00
benjamin-wilson f6daf67911 deploy: 3c2018889f 2023-08-19 19:55:21 +00:00
benjamin-wilson e6c23cb246 deploy: 41ae76c10e 2023-08-10 01:33:12 +00:00
benjamin-wilson 4932fb44d8 deploy: f8438bfaac 2023-08-10 01:26:32 +00:00
benjamin-wilson 78804da01d deploy: 5027b8c600 2023-08-10 01:01:43 +00:00
benjamin-wilson 746fd30e49 deploy: a93776f907 2023-08-10 00:48:03 +00:00
benjamin-wilson 02a76008f8 deploy: 4a4ece124f 2023-08-09 21:27:55 +00:00
benjamin-wilson 2a8f32b6af deploy: 690458b270 2023-08-09 15:38:05 +00:00
benjamin-wilson ba40b25163 deploy: 1df45d04a1 2023-08-09 15:16:21 +00:00
benjamin-wilson 471a38baad deploy: 4f60ccfda6 2023-08-09 14:25:50 +00:00
benjamin-wilson e44ae0800f deploy: 4e9e61fd28 2023-08-09 02:41:27 +00:00
benjamin-wilson 5ac9cb8f62 deploy: 63b64005e9 2023-08-09 02:36:20 +00:00
Benjamin Wilson 24d6ec8b9a Create CNAME 2023-08-08 22:32:35 -04:00
benjamin-wilson c717119de3 deploy: 6e644b03fa 2023-08-09 02:29:32 +00:00
Benjamin Wilson e5b9eb3ef7 Create CNAME 2023-08-08 22:18:54 -04:00
benjamin-wilson 7b5d59ffe1 deploy: 789fc6064e 2023-08-09 02:14:43 +00:00
Benjamin Wilson 6c65c12c40 Update CNAME 2023-08-08 22:09:50 -04:00
Benjamin Wilson c92fb781b7 Create CNAME 2023-08-08 22:09:19 -04:00
benjamin-wilson 1128e8dfce deploy: 6c604c46a2 2023-08-09 02:07:41 +00:00
Benjamin Wilson 5f9e402326 Create CNAME 2023-08-08 22:02:44 -04:00
benjamin-wilson f2d4062104 deploy: 472a632b96 2023-08-08 04:22:15 +00:00
benjamin-wilson 0d5205d923 deploy: ec2c2a955c 2023-08-06 23:18:16 +00:00
benjamin-wilson edb2e1bd94 deploy: 4a980a9176 2023-08-06 22:18:36 +00:00
benjamin-wilson 4692aeb37b deploy: ad9f831b91 2023-08-06 22:01:43 +00:00
benjamin-wilson 96d502d131 deploy: 09ba050849 2023-08-06 04:11:26 +00:00
benjamin-wilson ce50325d84 deploy: 7106c997b6 2023-08-04 20:52:39 +00:00
benjamin-wilson 7fea60c839 deploy: d8241362e6 2023-08-04 02:43:46 +00:00
benjamin-wilson 53f9ea9ca5 deploy: b32b2ef3ab 2023-08-03 22:00:49 +00:00
benjamin-wilson 9abb4cb896 deploy: 5b0be8a652 2023-08-03 21:56:12 +00:00
benjamin-wilson 531c580f6f deploy: db98e8c6b7 2023-08-03 21:50:12 +00:00
benjamin-wilson 07d755a166 deploy: d5b172e25f 2023-08-03 21:39:14 +00:00
264 changed files with 1725 additions and 18252 deletions
-4
View File
@@ -1,4 +0,0 @@
dist
node_modules
README.md
.vscode
-16
View File
@@ -1,16 +0,0 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
-35
View File
@@ -1,35 +0,0 @@
name: "Test build of image when Dockerfile is changed"
on:
push:
branches-ignore:
- master
pull_request:
workflow_dispatch:
jobs:
rebuild-container:
name: "Build image with cache"
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: linux/arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Build image
id: docker_build_amd64
uses: docker/build-push-action@v5.1.0
with:
push: false
load: true
platforms: linux/amd64
tags: public-pool-ui:amd64
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/public-pool-ui:latest
-32
View File
@@ -1,32 +0,0 @@
name: GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm ci --force
- name: Build
run: npm run build:github
- name: Deploy
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist/public-pool-ui
enable_jekyll: true
-37
View File
@@ -1,37 +0,0 @@
name: Build and scan container for vulnerabilities with Trivy
on:
push:
pull_request:
schedule:
- cron: '22 14 * * 0'
workflow_dispatch:
jobs:
build:
name: Build and scan images
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v4
-
name: Build image from Dockerfile
uses: docker/build-push-action@v5.1.0
with:
push: false
load: true
tags: ${{ secrets.DOCKER_USERNAME }}/public-pool-ui:latest
-
name: Run Trivy vulnerability scanner against "latest" image
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{ secrets.DOCKER_USERNAME }}/public-pool-ui:latest'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
-
name: Upload "latest" Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
-61
View File
@@ -1,61 +0,0 @@
name: "Update image and push to Github Packages and Docker Hub weekly"
on:
schedule:
- cron: "0 12 * * 1" # Run every Monday at noon.
workflow_dispatch:
jobs:
rebuild-container:
name: "Rebuild Container with the latest base image"
runs-on: ubuntu-latest
steps:
-
name: Prepare outputs
id: prep
run: |
echo "::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: linux/arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Get short SHA
id: get_short_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
-
name: Build and push to Docker Hub and GitHub Packages Docker Registry
id: docker_build
uses: docker/build-push-action@v5.1.0
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/public-pool-ui:latest
ghcr.io/${{ github.repository_owner }}/public-pool-ui:${{ steps.get_short_sha.outputs.sha_short }}
${{ secrets.DOCKER_USERNAME }}/public-pool-ui:latest
${{ secrets.DOCKER_USERNAME }}/public-pool-ui:${{ steps.get_short_sha.outputs.sha_short }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
@@ -1,64 +0,0 @@
name: "Update image when Dockerfile is changed"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
rebuild-container:
name: "Rebuild Container with the latest base image"
runs-on: ubuntu-latest
steps:
-
name: Prepare outputs
id: prep
run: |
echo "::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
with:
platforms: linux/arm64
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Get short SHA
id: get_short_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
-
name: Build and push to Docker Hub and GitHub Packages Docker Registry
uses: docker/build-push-action@v5.1.0
id: docker_build_push
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/public-pool-ui:latest
ghcr.io/${{ github.repository_owner }}/public-pool-ui:${{ steps.get_short_sha.outputs.sha_short }}
${{ secrets.DOCKER_USERNAME }}/public-pool-ui:latest
${{ secrets.DOCKER_USERNAME }}/public-pool-ui:${{ steps.get_short_sha.outputs.sha_short }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.html_url }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/public-pool-ui:latest
cache-to: type=inline
-42
View File
@@ -1,42 +0,0 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
# Node
/node_modules
npm-debug.log
yarn-error.log
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
# System files
.DS_Store
Thumbs.db
-4
View File
@@ -1,4 +0,0 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
-20
View File
@@ -1,20 +0,0 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/",
"sourceMaps": true
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
-42
View File
@@ -1,42 +0,0 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
+1410
View File
File diff suppressed because it is too large Load Diff
-35
View File
@@ -1,35 +0,0 @@
############################
# Docker build environment #
############################
FROM node:lts-bookworm-slim AS build
# Upgrade all packages and install dependencies
RUN apt-get update \
&& apt-get upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
build-essential \
&& apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /build
COPY . .
# Build Public Pool UI using NPM
RUN npm i && npm run build
############################
# Docker final environment #
############################
FROM caddy:alpine AS final
EXPOSE 80
WORKDIR /var/www/html
COPY --from=build /build/dist/public-pool-ui .
COPY docker/Caddyfile.tpl /etc/Caddyfile.tpl
COPY docker/entrypoint.sh /entrypoint.sh
CMD ["/bin/sh", "/entrypoint.sh"]
-53
View File
@@ -1,53 +0,0 @@
# PublicPoolUi
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.0.3.
## Dependencies
Requires [Public-Pool](https://github.com/benjamin-wilson/public-pool) to be running
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
## Deployment
Install pm2 (https://pm2.keymetrics.io/)
```bash
$ pm2 serve --spa dist/public-pool-ui/ 3335 --name ui
```
## Docker
```bash
$ docker build -t public-pool-ui .
$ docker run --name public-pool-ui --rm -p 8080:80 public-pool-ui
```
From Docker commands, website will be accessible on [http://localhost:8080](http://localhost:8080). By default Caddy server listen on port 80, but we bind it to port 8080 which allows you to launch image without root permissions.
Available variables:
* `DOMAIN`: website domain (default: `localhost`)
* `LOGLEVEL`: loglevel in stdout (default: `INFO`)
* `LOGFORMAT`: log format in stdout (default: `json`)
-162
View File
@@ -1,162 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"public-pool-ui": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/public-pool-ui",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"src/styles"
]
},
"scripts": [
"node_modules/chart.js/dist/chart.js"
]
},
"configurations": {
"electron": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.electron.ts"
}
],
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "3mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "3mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "3mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "public-pool-ui:build:production"
},
"development": {
"browserTarget": "public-pool-ui:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "public-pool-ui:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
}
}
}
},
"cli": {
"analytics": false
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 986 KiB

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

Before

Width:  |  Height:  |  Size: 970 B

After

Width:  |  Height:  |  Size: 970 B

Before

Width:  |  Height:  |  Size: 991 B

After

Width:  |  Height:  |  Size: 991 B

Before

Width:  |  Height:  |  Size: 943 B

After

Width:  |  Height:  |  Size: 943 B

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show More