Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
build:
permissions:
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::654654236858:role/GithubActions
role-to-assume: ${{ secrets.ACTIONS_ROLE_ARN }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-2

Expand All @@ -31,10 +31,10 @@ jobs:

- name: Build and Push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry}}
REPOSITORY: abide-connect
IMAGE_TAG: ${{ github.sha}}
DATABASE_URL: "file:./prisma/dev.db"
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ vars.REPOSITORY }}
IMAGE_TAG: ${{ github.sha }}
DATABASE_URL: 'file:./dev.db'
run: |
docker buildx build --output type=image,push=true --platform linux/arm64 -t $ECR_REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker buildx build --output type=image,push=true --platform linux/arm64 -t $ECR_REGISTRY/$REPOSITORY:prod .
docker build --output type=image,push=true --platform linux/arm64 -t $ECR_REGISTRY/$REPOSITORY:$IMAGE_TAG .
docker build --output type=image,push=true --platform linux/arm64 -t $ECR_REGISTRY/$REPOSITORY:prod .
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Post-Signup Volunteer Dashboard

Admin Dashboard (Admin only)
- Overview Panel
- Event management
- Training Certificate approval
- Volunteer hour log approval
- Donation fund creation

Event Management
- Add Event (options: volunteer-only, public, internal)
Expand Down Expand Up @@ -86,16 +86,16 @@ Next, make sure to create a `.env` file based on the `.env.example` file and fil
Then, initialize prisma client.

```bash
pnpx prisma generate
pnpm prisma generate
```

The generated client will be placed in `/server/utils/generated/prisma`.

Next, migrate and seed the database.

```bash
pnpx prisma migrate dev
pnpx prisma db seed
pnpm prisma migrate dev
pnpm prisma db seed
```

You are now ready to use/deploy the app!
Expand All @@ -121,8 +121,8 @@ After performing database operations, it may be good to reset the database to en
In order to achieve this, run the following commands:

```bash
pnpx prisma migrate reset
pnpx prisma db seed
pnpm prisma migrate reset
pnpm prisma db seed
```

### Production
Expand All @@ -140,4 +140,4 @@ pnpm run build
## Deploying to Production

There is currently a Github Actions flow setup such that for each commit to main, a new build is created and dockerized.
We can then manually deploy to the NPTS EC2 instances for prod and staging that are currently set up.
This then gets automatically deployed to the NPTS ECS cluster.