Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inital Nextjs Build #61

Closed
wants to merge 179 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
3d94e17
Merge pull request #18 from 7Cav/Development
Vercin-G Sep 7, 2022
596e617
add tracking
uaon Sep 12, 2022
afe2c10
Revert "add tracking"
uaon Sep 12, 2022
bf3f7cd
tracking code v2
uaon Sep 12, 2022
4d9ac64
Update App.js
uaon Sep 12, 2022
fd23351
fix className error
uaon Sep 12, 2022
0cfb2c6
update workflow
uaon Sep 12, 2022
b501bf6
Update main.yml
uaon Sep 12, 2022
6219198
Update main.yml
uaon Sep 12, 2022
3aeedfe
Update main.yml
uaon Sep 12, 2022
fbd85c3
Update main.yml
uaon Sep 12, 2022
774dbb4
Create .env
uaon Sep 12, 2022
7d16f4d
add clarity
uaon Sep 12, 2022
7c7e0f1
Update App.js
uaon Sep 12, 2022
6120233
Update App.js
uaon Sep 12, 2022
3383aeb
Update App.js
uaon Sep 12, 2022
7108d06
Update App.js
uaon Sep 12, 2022
4834b85
test changes
uaon Sep 12, 2022
3bcd6ad
Update Card.js
uaon Sep 12, 2022
2479019
use native script on clarity
uaon Sep 12, 2022
fe0de2f
Merge pull request #19 from 7Cav/Development
Vercin-G Sep 26, 2022
4f2a313
Update BilletListMar2022.txt
Talldog95 Feb 20, 2023
64624da
Update BilletBank.js
Talldog95 Feb 20, 2023
1c43278
Merge pull request #23 from 7Cav/Development
King-Strider Jul 26, 2023
859f9f0
Revert "Merge pull request #23 from 7Cav/Development"
King-Strider Jul 26, 2023
4c8ea9d
Update main.yml
SyniRon Jul 26, 2023
e40dbf4
Merge pull request #20 from Talldog95/patch-1
SyniRon Jul 26, 2023
d75b912
Merge pull request #21 from Talldog95/patch-2
SyniRon Jul 26, 2023
e42ead3
ADR Update July '23
King-Strider Jul 26, 2023
e896d3a
Merge branch 'main' of https://github.com/7Cav/adr
King-Strider Jul 26, 2023
29c6aae
Final July '23 Billet Bank Update
King-Strider Jul 26, 2023
9ec6d85
Additional changes for July '23
King-Strider Jul 27, 2023
a91bbbc
Moved NCOA Senior to under LD
King-Strider Jul 27, 2023
422b5fe
migrate to env instead of token file
SyniRon Jul 31, 2023
865fd10
fix package.json typo
SyniRon Jul 31, 2023
983ebca
Revert "fix package.json typo"
SyniRon Aug 2, 2023
092c3c1
Revert "migrate to env instead of token file"
SyniRon Aug 2, 2023
349b5e1
Push-To-Deploy initial
SyniRon Aug 2, 2023
e594b89
Update README.md
SyniRon Aug 2, 2023
1c0d9d9
First run workflow build
SyniRon Aug 2, 2023
a7155b6
linting fixes
SyniRon Aug 2, 2023
e357d56
change npm install type in workflow
SyniRon Aug 2, 2023
f8c9f3b
devoops
SyniRon Aug 2, 2023
7904249
fix dockerfile context
SyniRon Aug 2, 2023
32c543d
debugging
SyniRon Aug 2, 2023
865caed
build context is annoying
SyniRon Aug 2, 2023
273eb79
yet more annoying
SyniRon Aug 2, 2023
16ef511
and yet more annoying
SyniRon Aug 2, 2023
28a6a4a
and yet still more annoying
SyniRon Aug 2, 2023
1ed6979
debugging
SyniRon Aug 2, 2023
0898390
when you edit the wrong dockerfile for a while
SyniRon Aug 2, 2023
2be7c46
don't build it twice
SyniRon Aug 2, 2023
94004e8
Lets do it live
SyniRon Aug 2, 2023
8fd9081
fix typos
SyniRon Aug 2, 2023
976b905
add correct image placeholders
SyniRon Aug 2, 2023
a1631f0
code improvements
SyniRon Aug 2, 2023
a877244
remove resource limits
SyniRon Aug 2, 2023
9ada8c1
switch from ci to install
SyniRon Aug 2, 2023
b276d4a
ignore client for server dockerfile
SyniRon Aug 2, 2023
5e504e8
update react
SyniRon Aug 2, 2023
66964bd
react collapsible update
SyniRon Aug 2, 2023
d685bc9
prep for push to deploy for server
SyniRon Aug 2, 2023
b10ea4d
Enable push to deploy for both
SyniRon Aug 2, 2023
e6b6194
fix image name
SyniRon Aug 2, 2023
f9610db
legacy deps
SyniRon Aug 2, 2023
8bfc998
move build to dockerfile and other improvements
SyniRon Aug 2, 2023
7702003
move build to workflow
SyniRon Aug 2, 2023
704a172
disable client push till i can finish fixing
SyniRon Aug 2, 2023
4593b66
well i kinda need that
SyniRon Aug 2, 2023
a7a8ad3
was it this the whole time
SyniRon Aug 2, 2023
a53a45e
Updated missing roles
King-Strider Aug 7, 2023
342f4be
Update BilletBank.js
King-Strider Aug 7, 2023
31de658
Add 3/A/ACD Billets, Add FCC Analyst Billet
astetchkov Aug 7, 2023
3f59abc
Merge pull request #1 from astetchkov/astetchkov-patch-1
astetchkov Aug 7, 2023
b46af2e
Merge pull request #24 from astetchkov/main
SyniRon Aug 7, 2023
c525fa6
Add FCC Billet
astetchkov Aug 7, 2023
80d56e2
Merge pull request #25 from astetchkov/main-1
SyniRon Aug 7, 2023
71023b9
Fix sorting to not resort arrays numerically
SyniRon Aug 8, 2023
1782512
Reorder ACD HQ
SyniRon Aug 8, 2023
41517b1
implement top of the hour caching
SyniRon Sep 3, 2023
a93524a
remove temp comment
SyniRon Sep 3, 2023
63368bc
add grace period to cache expiry
SyniRon Sep 3, 2023
c4e39ce
add notice about data caching
SyniRon Sep 3, 2023
7c8cc5b
Merge pull request #26 from 7Cav/cache_dev
SyniRon Sep 3, 2023
96ddb1d
knew i'd forget this and I did
SyniRon Sep 3, 2023
871a608
Merge pull request #27 from 7Cav/main
SyniRon Sep 3, 2023
58e0f65
Merge pull request #28 from 7Cav/cache_dev
SyniRon Sep 3, 2023
516fcf6
Add workflow for checking prod url
SyniRon Sep 3, 2023
b8e1ce2
Add error handling to fetch
SyniRon Sep 3, 2023
ecfb4e7
correct url in workflow
SyniRon Sep 3, 2023
44eec66
capitalization is important
SyniRon Sep 3, 2023
3fe1a6d
correct App.js path
SyniRon Sep 3, 2023
7578b85
debug workflow
SyniRon Sep 3, 2023
c0ac857
root dir oopsie
SyniRon Sep 3, 2023
0dca4c3
Merge pull request #29 from 7Cav/client_error_handling_dev
SyniRon Sep 3, 2023
3f9c5df
update gitignore
SyniRon Sep 3, 2023
749c51e
Implement cors and server auth
SyniRon Sep 3, 2023
e0d5009
update client example token
SyniRon Sep 3, 2023
e47fc16
fix prod url
SyniRon Sep 3, 2023
fdafe15
update deployments for new tokens
SyniRon Sep 3, 2023
7817881
update url check to only check on app.js changes
SyniRon Sep 3, 2023
ce4e9a0
Merge pull request #30 from 7Cav/cors_auth_dev
SyniRon Sep 3, 2023
8d640ec
update to use env to allow build
SyniRon Sep 3, 2023
efd8db3
remove client use of secret
SyniRon Sep 3, 2023
febb03f
update workflow to use token
SyniRon Sep 3, 2023
9e66bfe
Merge pull request #31 from 7Cav/main
SyniRon Sep 3, 2023
0b878b4
Merge pull request #32 from 7Cav/cors_auth_dev
SyniRon Sep 3, 2023
37769f4
fix deployment to use new env
SyniRon Sep 3, 2023
fe817f3
Merge pull request #33 from 7Cav/main
SyniRon Sep 3, 2023
dc2b657
Merge pull request #34 from 7Cav/cors_auth_dev
SyniRon Sep 3, 2023
96f8618
Fix deployment typo
SyniRon Sep 3, 2023
71f459d
Merge pull request #35 from 7Cav/cors_auth_dev
SyniRon Sep 3, 2023
5d6ecd9
Reformatting for Standardization and update readmes (#36)
SyniRon Sep 3, 2023
6f4b70e
Formatting and minor work (#37)
SyniRon Sep 4, 2023
1cbf6f0
Implement Compression (#38)
SyniRon Sep 4, 2023
26057d1
Add Loading Indicator and Error Messages (#39)
SyniRon Sep 4, 2023
0ffd2af
fix deployment
SyniRon Sep 4, 2023
52a38e3
build fixes
SyniRon Sep 4, 2023
d7a88f8
another fix attempt
SyniRon Sep 4, 2023
41c3220
fixed but oops a typo
SyniRon Sep 4, 2023
942952a
Update README.md
SyniRon Sep 4, 2023
f24627d
Add Cache Timer Display (#43)
SyniRon Sep 7, 2023
5ca0a1a
Statistics Section (Reworked) (#46)
Vercin-G Sep 8, 2023
2149bfc
Readme.md Update (#47)
Vercin-G Sep 10, 2023
c915326
fix unit strength counter to ignore duplicates (#48)
SyniRon Sep 11, 2023
99522fc
Pie Charts (#50)
Vercin-G Sep 14, 2023
19dce78
App.js and Milpac.js refactor (#51)
Vercin-G Sep 17, 2023
15277e0
Housekeeping (#53)
Vercin-G Sep 24, 2023
6eb20a6
Refactor 2 electric boogaloo (#54)
Vercin-G Sep 26, 2023
7eb221f
Bugfix and more housekeeping (#55)
Vercin-G Sep 26, 2023
5e4aeb4
AdrListEntry hotfix (#56)
Vercin-G Sep 27, 2023
3076ac7
Routing + CavApps rebrand (#57)
Vercin-G Oct 3, 2023
c826bdc
workflow fix for new urls
SyniRon Oct 3, 2023
e053159
fix cors policy
SyniRon Oct 3, 2023
404bf96
update deployment for subpages
SyniRon Oct 3, 2023
287460e
possible subpage fix
SyniRon Oct 3, 2023
8d8842b
deployment revert
SyniRon Oct 3, 2023
be07299
inital commit
Vercin-G Oct 9, 2023
630bb4a
server and basic pages
Vercin-G Oct 9, 2023
76ade0d
page modules and css files
Vercin-G Oct 9, 2023
aca042d
api testing
Vercin-G Oct 9, 2023
1518806
API Return
Vercin-G Oct 9, 2023
b930059
adr test entries
Vercin-G Oct 9, 2023
0992d1c
Delete .env
Vercin-G Oct 9, 2023
81da8be
Update .gitignore
Vercin-G Oct 9, 2023
cf76b28
Merge branch 'nextjs-dev' of https://github.com/Vercin-G/adr into nex…
Vercin-G Oct 9, 2023
b14831d
no store cache
Vercin-G Oct 9, 2023
5210329
adr minimum viable product
Vercin-G Oct 11, 2023
254dd75
better describe ArrayBuilder.js
Vercin-G Oct 11, 2023
badcb54
404 + index
Vercin-G Oct 11, 2023
330ce76
noindex + remove old heatmap code
Vercin-G Oct 12, 2023
430df8f
ADR loading + Cache timer + remove server actions
Vercin-G Oct 14, 2023
f68c53d
rosterstatistics port
Vercin-G Oct 14, 2023
7160b6d
minimum viable product
Vercin-G Oct 14, 2023
5ebe6a0
Fix S5 Billets in D/ACD
Vercin-G Nov 19, 2023
c7cb7df
Add S2 Investigator Billet
Vercin-G Nov 19, 2023
72e88eb
Billetbank update
Vercin-G Dec 14, 2023
3f8c8b9
initial beta deployment configuration
Vercin-G Jan 13, 2024
ed0aa67
hmmm....
Vercin-G Jan 13, 2024
0554171
another hmmm....
Vercin-G Jan 17, 2024
545ccb7
beta --> Development branch
Vercin-G Jan 18, 2024
0df3539
Merge remote-tracking branch 'upstream/Development' into nextjs-dev
Vercin-G Jan 20, 2024
76728f1
prettier changes
Vercin-G Jan 21, 2024
3b01cd0
adjust deployment commands
Vercin-G Jan 21, 2024
ef92151
hmm
Vercin-G Jan 21, 2024
793137e
configure server to allow beta version
Vercin-G Jan 21, 2024
5996adb
adjust server again
Vercin-G Jan 21, 2024
cf02c3f
test
Vercin-G Jan 21, 2024
900a88e
add timestamp url to build check
Vercin-G Jan 21, 2024
a3051f5
not localhost
Vercin-G Jan 21, 2024
8202676
try this maybe?
Vercin-G Jan 21, 2024
2278cca
hmm
Vercin-G Jan 21, 2024
8d6dcdd
anotha 1
Vercin-G Jan 21, 2024
6432395
does dev work
Vercin-G Jan 21, 2024
beeba31
nope
Vercin-G Jan 21, 2024
62f89fb
revert all changes
Vercin-G Jan 21, 2024
fb761f6
try something else
Vercin-G Jan 21, 2024
536aa3b
adjust deployment script
Vercin-G Jan 22, 2024
00ea75e
seperate manual and autodeploy scripts
Vercin-G Jan 22, 2024
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
45 changes: 45 additions & 0 deletions .github/workflows/beta_build_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: BETA_BUILD_CHECK

# Controls when the workflow will run
on:
pull_request:
branches:
- Development
paths:
- ".github/workflows/beta_client_adr_push.yml"
- "src/**"
- "config/client/**"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# deployment
client_deployment:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
REACT_APP_CLIENT_TOKEN: ${{ secrets.CLIENT_TOKEN }}
REACT_APP_COMBAT_API_URL: "https://bff.apps.7cav.us/roster/combat"
REACT_APP_RESERVE_API_URL: "https://bff.apps.7cav.us/roster/reserve"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout the Repo
uses: actions/checkout@v3

- name: Setup node.js
uses: actions/setup-node@v3

- name: Install Dependancies
run: npm i
working-directory: src

- name: Update Browserlist
run: npx browserslist@latest --update-db
working-directory: src

- name: Build Client to Prod
run: npm run build
working-directory: src
72 changes: 72 additions & 0 deletions .github/workflows/beta_client_auto_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This is a basic workflow to help you get started with Actions

name: BETA_CLIENT_AUTO_DEPLOY

# Controls when the workflow will run
on:
push:
branches:
- Development
paths:
- ".github/workflows/beta_client_adr_push.yml"
- "src/app/**"
- "config/client/**"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# deployment
client_deployment:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
REACT_APP_CLIENT_TOKEN: ${{ secrets.CLIENT_TOKEN }}
REACT_APP_COMBAT_API_URL: "https://bff.apps.7cav.us/roster/combat"
REACT_APP_RESERVE_API_URL: "https://bff.apps.7cav.us/roster/reserves"
REACT_APP_CACHE_TIMESTAMP_URL: "https://bff.apps.7cav.us/cache-timestamp"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout the Repo
uses: actions/checkout@v3

- name: Setup node.js
uses: actions/setup-node@v3

- name: Install Dependancies
run: npm i
working-directory: src

- name: Update Browserlist
run: npx browserslist@latest --update-db
working-directory: src

- name: Build Client to Prod
run: npm run build
working-directory: src

- name: Build client Image
run: docker build --file ./src/app/Dockerfile --tag registry.digitalocean.com/s6containers/adr_client:$(echo $GITHUB_SHA | head -c7) .

- name: Instal doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Log in to DO Container Registry
run: doctl registry login --expiry-seconds 600

- name: Push image to DO Container Registry
run: docker push registry.digitalocean.com/s6containers/adr_client:$(echo $GITHUB_SHA | head -c7)

- name: Update Deployment File
run: TAG=$(echo $GITHUB_SHA | head -c7) && sed -i 's|<IMAGE>|registry.digitalocean.com/s6containers/adr_client:'${TAG}'|' $GITHUB_WORKSPACE/config/client/deployment.yml

- name: Save DO Kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 cav-kube

- name: Deploy to DO Cluster
run: kubectl apply -f $GITHUB_WORKSPACE/config/client/deployment.yml

- name: Verify Deployment
run: kubectl rollout status deployment/adr-client -n 7cav
66 changes: 66 additions & 0 deletions .github/workflows/beta_client_manual_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This is a basic workflow to help you get started with Actions

name: BETA_CLIENT_MANUAL_DEPLOY

# Controls when the workflow will run
on:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# deployment
client_deployment:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
REACT_APP_CLIENT_TOKEN: ${{ secrets.CLIENT_TOKEN }}
REACT_APP_COMBAT_API_URL: "https://bff.apps.7cav.us/roster/combat"
REACT_APP_RESERVE_API_URL: "https://bff.apps.7cav.us/roster/reserves"
REACT_APP_CACHE_TIMESTAMP_URL: "https://bff.apps.7cav.us/cache-timestamp"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout the Repo
uses: actions/checkout@v3

- name: Setup node.js
uses: actions/setup-node@v3

- name: Install Dependancies
run: npm i
working-directory: src

- name: Update Browserlist
run: npx browserslist@latest --update-db
working-directory: src

- name: Build Client to Prod
run: npm run build
working-directory: src

- name: Build client Image
run: docker build --file ./src/app/Dockerfile --tag registry.digitalocean.com/s6containers/adr_client:$(echo $GITHUB_SHA | head -c7) .

- name: Instal doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

- name: Log in to DO Container Registry
run: doctl registry login --expiry-seconds 600

- name: Push image to DO Container Registry
run: docker push registry.digitalocean.com/s6containers/adr_client:$(echo $GITHUB_SHA | head -c7)

- name: Update Deployment File
run: TAG=$(echo $GITHUB_SHA | head -c7) && sed -i 's|<IMAGE>|registry.digitalocean.com/s6containers/adr_client:'${TAG}'|' $GITHUB_WORKSPACE/config/client/deployment.yml

- name: Save DO Kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 cav-kube

- name: Deploy to DO Cluster
run: kubectl apply -f $GITHUB_WORKSPACE/config/client/deployment.yml

- name: Verify Deployment
run: kubectl rollout status deployment/adr-client -n 7cav
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# This is a basic workflow to help you get started with Actions

name: ADR_PUSH
name: BETA_LINT_FORMAT_CHECK

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
branches:
- Development

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# deployment
deployment:
lint_format_check:
# The type of runner that the job will run on
runs-on: self-hosted
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Checkout the Repo
uses: actions/checkout@v3

- name: change directory to /docker-adr/src
run: git -C /opt/compose/docker-adr/src pull
- name: Prettiier
uses: creyD/[email protected]
with:
prettier_options: "--check {**/*,*}.{js,jsx,json,html,css,yml,yaml}"
prettier_version: "2.8.8"
41 changes: 38 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
node_modules/
credentials/token.js
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

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

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

# Server Token
server/credentials/token.js
package-lock.json
.env
Loading
Loading