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

Tag branch #127

Merged
merged 153 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
4b879cb
Some more work on new GQL stuff
jthoward64 Apr 20, 2024
808494c
Update GraphQL schema with new types and fields
jthoward64 Apr 20, 2024
a2bf5e0
Add custom scalar types for NodeID and Cursor
jthoward64 Apr 20, 2024
2de4dc6
Import DateTimeISOResolver from graphql-scalars
jthoward64 Apr 20, 2024
d631026
Add Node, Edge, Connection, Resource, Result, PageInfo, and ResourceE…
jthoward64 Apr 20, 2024
d543196
Update cSpell.words in .vscode/settings.json
jthoward64 Apr 20, 2024
9c6db12
Update id and tweak relay defs
jthoward64 Apr 21, 2024
191f671
Update id and tweak relay defs
jthoward64 Apr 21, 2024
7827e0c
Update relay definitions and add new node classes
jthoward64 Apr 21, 2024
bfe089c
Refactor file structure and import paths
jthoward64 Apr 21, 2024
29999ad
Add IntervalISO type and update import paths
jthoward64 Apr 21, 2024
e9ef363
Refactor GraphQL schema and update import paths
jthoward64 Apr 21, 2024
b1e7a99
Refactor GraphQL schema and update import paths
jthoward64 Apr 21, 2024
19a84d8
Refactor GraphQL schema and update import paths
jthoward64 Apr 23, 2024
be7d1a9
Refactor file structure and update import paths
jthoward64 Apr 23, 2024
f6201b4
Update id field names in Node classes
jthoward64 Apr 24, 2024
2555c5b
Add CommitteeNode class to common/lib/api/resources/Committee.ts
jthoward64 Apr 24, 2024
e26ad9a
Refactor Node class names and update import paths
jthoward64 Apr 24, 2024
98fca04
Refactor PersonResource class to PersonNode and update import paths
jthoward64 Apr 24, 2024
7340708
Start on prisma stuff for marathon teams
jthoward64 Apr 25, 2024
ac59e10
Resolve errors from device resolver
jthoward64 Apr 23, 2024
4869cfa
Replace references to renamed classes
jthoward64 Apr 23, 2024
d403acd
Refactor import paths and remove unused code
jthoward64 Apr 23, 2024
d512656
Update auth login functions to include empty committees array
jthoward64 Apr 23, 2024
c6bdcc7
Refactor import paths and update auth login functions
jthoward64 Apr 23, 2024
cb80cc4
Refactor import paths and update auth login functions
jthoward64 Apr 23, 2024
9f0714a
Refactor import paths and update auth login functions
jthoward64 Apr 23, 2024
1f49e4a
Add marathon_id column to teams table and update existing data
jthoward64 Apr 27, 2024
b7ecff4
Add marathon_id column to teams table and update existing data
jthoward64 Apr 27, 2024
7dbce31
Update resource model properties to use 'id' instead of 'uuid'
jthoward64 Apr 27, 2024
1731924
Update resource model properties to use 'id' instead of 'uuid'
jthoward64 Apr 27, 2024
f4646ac
Update resource model properties to use 'id' instead of 'uuid'
jthoward64 Apr 27, 2024
c2655ad
Add foreign key constraint for marathon_id in teams table
jthoward64 Apr 27, 2024
358376c
chore: Update CommitteeNode to include identifier field
jthoward64 May 3, 2024
5c42325
Add unique index for committees' identifier field
jthoward64 May 3, 2024
9323f88
Add overall committee to CommitteeIdentifier and committeeNames
jthoward64 May 3, 2024
573eb57
Update CommitteeRepository to include child and parent committee retr…
jthoward64 May 12, 2024
3a1b2d0
Update MarathonRepository and TeamRepository to use UniqueMarathonParam
jthoward64 May 12, 2024
7129dc0
Update database schema for optional marathon date and committee role …
jthoward64 May 14, 2024
aa16cb2
Update MembershipRepository to support assigning person to team with …
jthoward64 May 14, 2024
e52a633
Update MarathonRepository to order marathons by ascending year
jthoward64 May 15, 2024
5893313
Update personModelToResource to use personRepository for retrieving d…
jthoward64 May 15, 2024
dada276
Add Skyler Trowel and Camille Dyer as App Coordinators for DB25
jthoward64 May 7, 2024
5b8c055
Start updating mobile for changed API
jthoward64 May 15, 2024
4627ff4
More fixes on mobile for new API
jthoward64 May 15, 2024
40c6107
Fix remaining direct GraphQL errors
jthoward64 May 24, 2024
fe9aac9
Change some `uuid`s to `id`s
jthoward64 May 24, 2024
0dacdfb
Add more support for passing committee info to client
jthoward64 May 24, 2024
f65318c
Add support for retrieving committee memberships of a person
jthoward64 May 24, 2024
d4b881a
Update Luxon imports and interval handling in event-related files
jthoward64 May 24, 2024
0bc7343
Update PersonResolver to use CommitteeMembershipNode for committees f…
jthoward64 May 24, 2024
76d324a
Update code to use marathon.year instead of marathonYear in team forms
jthoward64 May 24, 2024
88ffbeb
Refactor team creation form to remove persistentIdentifier field
jthoward64 May 26, 2024
b4dbea0
Update logic around auth
jthoward64 May 26, 2024
24d4242
Finish simplifying JWT and auth stuff
jthoward64 May 26, 2024
a6375b1
Refactor GraphQL types and resolvers for LoginState
jthoward64 May 26, 2024
fb6ebaf
Remove unused common code
jthoward64 May 26, 2024
25ba74a
Remove unused server code
jthoward64 May 26, 2024
6ecddfd
Update TeamsTable filters to use enum values for type and legacy status
jthoward64 May 26, 2024
503d214
Rename SortDirection.*CENDING to *c
jthoward64 May 27, 2024
a6ab3a9
Refactor TeamsTable to integrate marathon filter with global setting
jthoward64 May 27, 2024
0806b6b
Refactor LoginStateResolver to use userData.authSource for determinin…
jthoward64 May 27, 2024
e67e154
Add database tables and foreign key constraints for fundraising entri…
jthoward64 May 29, 2024
5dbcd2b
Connect demoTeam by id in PersonRepository
jthoward64 May 29, 2024
09fca93
Update npm dependencies
jthoward64 May 29, 2024
d8aab0a
Remove old packages and add true-myth
jthoward64 May 29, 2024
aaa64d7
Add unique constraint for db_num and marathon_id in db_funds_teams table
jthoward64 May 29, 2024
f6b2868
Start on new error handling
jthoward64 May 29, 2024
b986640
Refactor error classes and result types
jthoward64 May 30, 2024
179c586
Add DBFundsFundraisingProvider implementation
jthoward64 May 30, 2024
3ab1895
Add zod package for runtime type validation
jthoward64 May 30, 2024
a06310f
Add DBFunds config to env
jthoward64 May 30, 2024
8a62b17
Update foreign key constraints for DBFunds team entries
jthoward64 May 30, 2024
742aff4
Refactor error classes and add NotFoundError class
jthoward64 May 30, 2024
a43149c
Refactor DBFundsFundraisingProvider and add identifier to Fundraising…
jthoward64 May 30, 2024
f978e3a
Start DBFunds repository
jthoward64 May 30, 2024
d1a4b65
Refactor DBFundsFundraisingProvider and update FundraisingTeam interface
jthoward64 May 30, 2024
0faca31
Add CompositeError class for handling multiple errors
jthoward64 May 31, 2024
d4b714c
Add syncDbFunds job for DBFunds synchronization
jthoward64 May 31, 2024
b56e337
Refactor error handling in DBFundsFundraisingProvider and DBFundsRepo…
jthoward64 May 31, 2024
9a50b7b
Get dbfunds sync going
jthoward64 May 31, 2024
06b320f
Fix dbfunds on null donatedBy
jthoward64 May 31, 2024
eb1c41e
Refactor DBFundsFundraisingProvider and DBFundsRepository
jthoward64 Jun 1, 2024
886c40d
Add FundraisingAssignment and FundraisingEntry resolvers
jthoward64 Jun 5, 2024
aa5ced0
Refactor FundraisingEntry and FundraisingAssignment classes
jthoward64 Jun 5, 2024
257dfca
Write the fundraising repository
jthoward64 Jun 5, 2024
f6b3fcc
Add ControlError and related classes for error handling
jthoward64 Jun 5, 2024
9e6ee54
Extract SomePrismaError type to alias
jthoward64 Jun 5, 2024
772395c
Remove preferTypeOnlyAutoImports
jthoward64 Jun 5, 2024
66e4c21
Add model to node functions
jthoward64 Jun 5, 2024
d363db4
Add true-myth to common
jthoward64 Jun 5, 2024
ecc9e9e
Add prettyPrintAuthorizationRule function
jthoward64 Jun 5, 2024
5a62630
Fix fundraising node classes
jthoward64 Jun 5, 2024
76624de
Start on resolvers for fundraising
jthoward64 Jun 5, 2024
801684f
Add FundraisingAssignment and FundraisingEntry resolvers
jthoward64 Jun 6, 2024
1a3736e
Update checkAuthorization function to support asynchronous custom aut…
jthoward64 Jun 6, 2024
05f761a
More work on implementing fundraising tracking
jthoward64 Jun 6, 2024
0682b7f
Add an entry point for fundraising to teams
jthoward64 Jun 6, 2024
68c3da0
Wrap up initial fundraising tracking support
jthoward64 Jun 7, 2024
6960528
Add an entry point to fundraising assignments under person
jthoward64 Jun 7, 2024
fd7c4ea
Some fundraising stuff
jthoward64 Jun 9, 2024
021380a
Add assignTeamToDbFundsTeam mutation
jthoward64 Jun 9, 2024
e1e385a
Update authorization context to include effective committee roles
jthoward64 Jun 13, 2024
a55c337
Get fundraising tracking's core "finished"
jthoward64 Jun 14, 2024
0590980
Simplify results use in resolvers
jthoward64 Jun 14, 2024
3c26882
feat: Add assignTeamToDbFundsTeam mutation
jthoward64 Jun 14, 2024
b5a33a9
Fix fields on committee roles
jthoward64 Jun 14, 2024
fbfc2cc
Update fundraising repository to check parent entry funds amount
jthoward64 Jun 14, 2024
9374a4e
Start getting marathon selection on portal
jthoward64 Jun 14, 2024
5143348
Implement Marathon selection
jthoward64 Jun 18, 2024
2e3c5cb
Remove unused imports and commented code in PersonCreator and PersonE…
jthoward64 Jun 18, 2024
5b28daf
Update team repository to use marathonId instead of marathonYear
jthoward64 Jun 18, 2024
3da25be
Update marathon config to save selected marathon in local storage
jthoward64 Jun 18, 2024
9b73ae3
Update marathon config to save selected marathon in local storage
jthoward64 Jun 18, 2024
9e34be5
Update LoginStateResolver to use ctx.authorization.dbRole instead of …
jthoward64 Jun 18, 2024
9da2a2b
Refactor FeedNode initialization to use 'id' instead of 'uuid'
jthoward64 Jun 18, 2024
744f40e
Rename FeedRepository
jthoward64 Jun 19, 2024
b6cef1b
Tweak logging code
jthoward64 Jun 27, 2024
b3da09f
Add a timeout to dbfunds sync
jthoward64 Jun 27, 2024
166475a
Fix tasks deps
jthoward64 Jun 27, 2024
1afb2b5
Start on temp fundraising on portal
jthoward64 Jun 27, 2024
41091e9
Update compose file
jthoward64 Jun 27, 2024
395142c
Some more work on compose file
jthoward64 Jun 27, 2024
95f520c
Add GlobalIdScalar custom scalar type for GraphQL API
jthoward64 Jun 29, 2024
57edfe0
Refactor code to use GlobalIdScalar for GraphQL API
jthoward64 Jun 29, 2024
c0f8ab9
Refactor code to use GlobalIdScalar for GraphQL API
jthoward64 Jun 29, 2024
5c84743
Add NodeResolver
jthoward64 Jun 29, 2024
491cbb4
Update schema
jthoward64 Jun 29, 2024
b5c0e37
Refactor code to use GlobalIdScalar for GraphQL API
jthoward64 Jul 1, 2024
3e38c59
Refactor error classes to use tags for better error handling
jthoward64 Jul 1, 2024
92896da
Do a pass with true-myth over the repositories
jthoward64 Jul 1, 2024
c67fca4
Refactor person code to use Result type for error handling
jthoward64 Jul 2, 2024
1cedcb6
Remove true-myth and add ts-results-es
jthoward64 Jul 2, 2024
470cd54
Switch from true-myth to ts-results-es
jthoward64 Jul 2, 2024
c0170dd
Fix some result issues
jthoward64 Jul 2, 2024
dbc3a7c
Misc
jthoward64 Jul 2, 2024
3390e94
Fix graphql errors
jthoward64 Jul 2, 2024
03896ca
Fix some more issues
jthoward64 Jul 2, 2024
ccc4786
Remove duplicate index file
jthoward64 Jul 2, 2024
30c580d
Add import aliases to server
jthoward64 Jul 2, 2024
23c5a96
Change import sort rules
jthoward64 Jul 2, 2024
f823185
Add more import aliasing
jthoward64 Jul 2, 2024
41ff9d0
Move error types to common
jthoward64 Jul 2, 2024
a860422
Update TypeScript dependency to version 5.5.3
jthoward64 Jul 2, 2024
1509414
Updates to server/docker config and startup
jthoward64 Jul 10, 2024
855f2f6
Tweak job schedule logic
jthoward64 Jul 10, 2024
6a302c5
Dockerfile updates
jthoward64 Jul 10, 2024
0ea03fc
More dockerfile stuff
jthoward64 Jul 10, 2024
2c08a09
Update devcontainer.json and compose.yaml
jthoward64 Jul 14, 2024
bd96bed
Merge dockerfiles
jthoward64 Jul 14, 2024
8d37043
Update Dockerfile and compose.yaml configurations to use secrets
jthoward64 Jul 19, 2024
ba2c91e
Update github action to build new dockerfile
jthoward64 Jul 19, 2024
f037a88
Rename graphql lib dirs
jthoward64 Jul 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:18
FROM mcr.microsoft.com/devcontainers/javascript-node:22

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
RUN curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
# RUN curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
Expand Down
9 changes: 3 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,16 @@

"containerEnv": {
"HOME": "/home/node",
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "danceblue",
"DB_UNAME": "danceblue",
"DB_PWD": "danceblue",
"DATABASE_URL": "postgres://danceblue:danceblue@localhost:5432/danceblue?schema=danceblue",
"NODE_ENV": "development",
"APPLICATION_HOST": "localhost",
"APPLICATION_PORT": "8000",
"MS_OIDC_URL": "https://login.microsoftonline.com/2b30530b-69b6-4457-b818-481cb53d42ae/v2.0/.well-known/openid-configuration",
"SERVE_ORIGIN": "http://localhost:8000",
"SERVE_PATH": "/workspaces/monorepo/local-uploads",
"UPLOAD_PATH": "/workspaces/monorepo/local-uploads",
"MAX_FILE_SIZE": "200"
"MAX_FILE_SIZE": "200",
"LOG_DIR": "/workspaces/monorepo/packages/server/logs"
},

"customizations": {
Expand Down
138 changes: 33 additions & 105 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,134 +19,62 @@ env:
SERVER_IMAGE_NAME: ukdanceblue/app-server

jobs:
build-and-push-portal-image:
build-and-push-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Enable Corepack before setting up Node
run: corepack enable
- name: Set up node 18.x
uses: actions/[email protected]
with:
node-version: 18
cache: yarn
- name: Install dependencies
working-directory: ./packages/portal
run:
yarn workspaces focus @ukdanceblue/common @ukdanceblue/portal
@ukdanceblue/monorepo
- name: Build GraphQL
run: yarn run gql:build
working-directory: .
- name: Build common
run: yarn run build
working-directory: ./packages/common
- name: Build portal
run: yarn run build
working-directory: ./packages/portal
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
id: portalMeta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.PORTAL_IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
with:
context: ./packages/portal
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-and-push-server-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Enable Corepack before setting up Node
run: corepack enable
- name: Set up node 18.x
uses: actions/[email protected]
with:
node-version: 18
cache: yarn
- name: Install dependencies
working-directory: ./packages/server
run:
yarn workspaces focus @ukdanceblue/common @ukdanceblue/server
@ukdanceblue/monorepo
- name: Build common
run: yarn run build
working-directory: ./packages/common
- name: Generate prisma client
run: yarn dlx prisma generate
working-directory: ./packages/server
- name: Build server
run: yarn run build
working-directory: ./packages/server
- name: Focus on server
run:
yarn workspaces focus --production @ukdanceblue/server
@ukdanceblue/common
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
id: serverMeta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
- name: Build and push Portal image
uses: docker/build-push-action@v6
with:
context: .
file: ./packages/server/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

trigger-recreate-release:
runs-on: ubuntu-latest
needs: [build-and-push-portal-image, build-and-push-server-image]
if: github.ref == 'refs/heads/release'
steps:
- name: Trigger container recreate
shell: bash
run: |
((curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_PORTAL_RECREATE_WEBHOOK }} -H "CF-Access-Client-Id: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_ID }}" -H "CF-Access-Client-Secret: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_SECRET }}") || exit 1)
((curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_SERVER_RECREATE_WEBHOOK }} -H "CF-Access-Client-Id: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_ID }}" -H "CF-Access-Client-Secret: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_SECRET }}") || exit 1)
trigger-recreate-main:
runs-on: ubuntu-latest
needs: [build-and-push-portal-image, build-and-push-server-image]
if: github.ref == 'refs/heads/main'
steps:
- name: Trigger container recreate
shell: bash
run: |
((curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_DEV_PORTAL_RECREATE_WEBHOOK }} -H "CF-Access-Client-Id: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_ID }}" -H "CF-Access-Client-Secret: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_SECRET }}") || exit 1)
((curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_DEV_SERVER_RECREATE_WEBHOOK }} -H "CF-Access-Client-Id: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_ID }}" -H "CF-Access-Client-Secret: ${{ secrets.CLOUDFLARE_ACCESS_SERVICE_TOKEN_CLIENT_SECRET }}") || exit 1)
tags: ${{ steps.portalMeta.outputs.tags }}
labels: ${{ steps.portalMeta.outputs.labels }}
target: portal
- name: Build and push Server image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.serverMeta.outputs.tags }}
labels: ${{ steps.serverMeta.outputs.labels }}
target: server
- name: Remove old Portal images
uses: actions/delete-package-versions@v5
with:
package-name: ${{ env.PORTAL_IMAGE_NAME }}
package-type: "container"
min-versions-to-keep: 2
delete-only-untagged-versions: "true"
- name: Remove old Server images
uses: actions/delete-package-versions@v5
with:
package-name: ${{ env.SERVER_IMAGE_NAME }}
package-type: "container"
min-versions-to-keep: 2
delete-only-untagged-versions: "true"
26 changes: 0 additions & 26 deletions .github/workflows/main-to-release.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"msjsdiag.vscode-react-native",
"Prisma.prisma",
"esbenp.prettier-vscode",
"christian-kohler.npm-intellisense",
"VisualStudioExptTeam.vscodeintellicode",
"VisualStudioExptTeam.intellicode-api-usage-examples",
"cmstead.js-codeformer",
"cmstead.jsrefactor",
"ecmel.vscode-html-css",
"GraphQL.vscode-graphql-syntax",
"GraphQL.vscode-graphql",
"eamodio.gitlens",
"github.vscode-github-actions",
"expo.vscode-expo-tools",
"ms-azuretools.vscode-docker",
"naumovs.color-highlight",
"streetsidesoftware.code-spell-checker",
"vitest.explorer",
"GitHub.copilot",
"GitHub.vscode-pull-request-github"
]
}
14 changes: 10 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"eslint.workingDirectories": ["."],
"eslint.experimental.useFlatConfig": true,
"eslint.useFlatConfig": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
"npm.packageManager": "yarn",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.organizeImports": "never",
"source.fixAll": "explicit"
},
"search.exclude": {
Expand All @@ -17,8 +17,14 @@
},
"remote.localPortHost": "allInterfaces",
"typescript.inlayHints.parameterNames.enabled": "all",
"typescript.preferences.preferTypeOnlyAutoImports": true,
"javascript.inlayHints.parameterNames.enabled": "all",
"cSpell.words": ["cooldown", "Spinnable", "Whatwg"],
"cSpell.words": [
"Catchable",
"cooldown",
"Errorable",
"Leaderboards",
"Spinnable",
"Whatwg"
],
"eslint.codeActionsOnSave.mode": "problems"
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"problemMatcher": [],
"label": "Server: Build",
"detail": "yarn workspace @ukdanceblue/server run build",
"dependsOn": ["Server: Prisma Generate", "Common: Build"]
"dependsOn": ["Common: Build"]
}
]
}
66 changes: 66 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# syntax=docker/dockerfile:1.7-labs
FROM node:22.4.1 as build

ADD --link --exclude=packages/mobile . /builddir

WORKDIR /builddir

RUN corepack yarn install

RUN corepack yarn run gql:build

WORKDIR /builddir/packages/common

RUN corepack yarn build

# Server build
FROM build as server-build

WORKDIR /builddir/packages/server

RUN corepack yarn prisma generate

RUN corepack yarn build

RUN corepack yarn workspaces focus --production -A

# Portal build
FROM build as portal-build

WORKDIR /builddir/packages/portal

ENV VITE_API_BASE_URL=""

RUN corepack yarn build

# Server
FROM node:22.4.1 as server

ENV MS_OIDC_URL="https://login.microsoftonline.com/2b30530b-69b6-4457-b818-481cb53d42ae/v2.0/.well-known/openid-configuration"
ENV NODE_ENV="production"
ENV APPLICATION_PORT="8000"
ENV APPLICATION_HOST="0.0.0.0"

RUN mkdir -p /app/packages/server
RUN mkdir -p /app/packages/common
RUN mkdir -p /app/.yarn
RUN mkdir -p /app/node_modules

COPY --from=server-build /builddir/packages/server/dist /app/packages/server/dist
COPY --from=server-build /builddir/packages/server/node_modules /app/packages/server/node_modules
COPY --from=server-build /builddir/packages/server/prisma /app/packages/server/prisma
COPY --from=server-build /builddir/packages/server/package.json /app/packages/server/package.json
COPY --from=server-build /builddir/packages/common/dist /app/packages/common/dist
COPY --from=server-build /builddir/packages/common/package.json /app/packages/common/package.json
COPY --from=server-build /builddir/node_modules /app/node_modules
COPY --from=server-build /builddir/package.json /app/package.json
COPY --from=server-build /builddir/yarn.lock /app/yarn.lock

WORKDIR /app/packages/server

CMD corepack yarn dlx prisma migrate deploy && node .

# Portal
FROM nginx:stable-alpine as portal

COPY --from=portal-build /builddir/packages/portal/dist /usr/share/nginx/html
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ Project Link:
DB22, DB23, DB24
- [Jackson Huse](https://github.com/jphuse) - App Design Coordinator - DB23,
DB24
- [Skyler Trowel](https://github.com/smtrowel) - App Development Coordinator -
DB25
- [Camille Dyer](https://github.com/cdyer8) - App Design Coordinator - DB25
- [Everyone on the DanceBlue committee](http://www.danceblue.org/meet-the-team)

<p align="right">(<a href="#top">back to top</a>)</p>
Loading
Loading