Compare commits

...

32 Commits

Author SHA1 Message Date
7d88890c3c Merge pull request 'switching terraform backend to azure storage' (#147) from 146-switch-terraform-backend into main
All checks were successful
Main / changes (push) Successful in 19s
Main / build-and-test (push) Has been skipped
Main / deploy (push) Has been skipped
Reviewed-on: #147
2026-07-13 12:51:24 -04:00
a54105e8e5 switching terraform backend to azure storage
All checks were successful
Pull Request / changes (pull_request) Successful in 22s
Pull Request / build-and-test (pull_request) Has been skipped
2026-07-13 11:50:31 -05:00
b8ec5be269 switching terraform backend to azure storage
All checks were successful
Pull Request / changes (pull_request) Successful in 19s
Pull Request / build-and-test (pull_request) Has been skipped
Pull Request / terraform-plan (pull_request) Has been skipped
2026-07-13 11:47:30 -05:00
875b8a0d90 switching terraform backend to azure storage
All checks were successful
Pull Request / changes (pull_request) Successful in 23s
Pull Request / build-and-test (pull_request) Has been skipped
Pull Request / terraform-plan (pull_request) Has been skipped
2026-07-13 11:46:41 -05:00
81c589001b switching terraform backend to azure storage
All checks were successful
Pull Request / changes (pull_request) Successful in 22s
Pull Request / build-and-test (pull_request) Has been skipped
Pull Request / terraform-plan (pull_request) Has been skipped
2026-07-13 11:31:00 -05:00
baedfc1675 Merge pull request 'adding infisical action to workflows' (#145) from 141-update-workflows-with-infisical into main
All checks were successful
Main / changes (push) Successful in 19s
Main / build-and-test (push) Has been skipped
Main / deploy (push) Has been skipped
Reviewed-on: #145
2026-07-13 12:10:51 -04:00
4eccf8e83c Merge branch 'main' into 141-update-workflows-with-infisical
All checks were successful
Pull Request / changes (pull_request) Successful in 15s
Pull Request / build-and-test (pull_request) Has been skipped
Pull Request / terraform-plan (pull_request) Has been skipped
2026-07-13 12:09:40 -04:00
a4778d29be adding infisical action to workflows
All checks were successful
Pull Request / changes (pull_request) Successful in 22s
Pull Request / build-and-test (pull_request) Has been skipped
Pull Request / terraform-plan (pull_request) Has been skipped
2026-07-13 11:09:06 -05:00
5c04870d37 Merge pull request '141-update-workflows-with-infisical' (#144) from 141-update-workflows-with-infisical into main
All checks were successful
Main / changes (push) Successful in 23s
Main / build-and-test (push) Has been skipped
Main / deploy (push) Successful in 2m38s
Reviewed-on: #144
2026-07-13 12:01:20 -04:00
c81b514ae8 Merge branch 'main' into 141-update-workflows-with-infisical
All checks were successful
Pull Request / changes (pull_request) Successful in 14s
Pull Request / build-and-test (pull_request) Has been skipped
2026-07-13 11:58:17 -04:00
5a07318527 adding infisical action to workflows
All checks were successful
Pull Request / changes (pull_request) Successful in 23s
Pull Request / build-and-test (pull_request) Has been skipped
2026-07-13 10:57:19 -05:00
99e5d162ef adding infisical action to workflows 2026-07-13 10:56:52 -05:00
755c429d04 Merge pull request 'adding infisical action to workflows' (#143) from 141-update-workflows-with-infisical into main
Some checks failed
Main / changes (push) Successful in 18s
Main / build-and-test (push) Has been skipped
Main / deploy (push) Failing after 7s
Reviewed-on: #143
2026-07-13 11:50:29 -04:00
6ea7326a57 adding infisical action to workflows
All checks were successful
Pull Request / changes (pull_request) Successful in 22s
Pull Request / build-and-test (pull_request) Has been skipped
2026-07-13 10:48:28 -05:00
e3f385d0a4 Merge pull request 'adding infisical action to workflows' (#142) from 141-update-workflows-with-infisical into main
Some checks failed
Main / changes (push) Successful in 24s
Main / build-and-test (push) Failing after 21s
Main / deploy (push) Failing after 7s
Reviewed-on: #142
2026-07-13 11:42:21 -04:00
f33a9982cc adding infisical action to workflows
All checks were successful
Pull Request / changes (pull_request) Successful in 18s
Pull Request / build-and-test (pull_request) Successful in 1m50s
2026-07-13 10:33:45 -05:00
100fd78551 adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 23s
Pull Request / build-and-test (pull_request) Failing after 20s
2026-07-13 09:31:14 -05:00
a87d35a5e4 adding infisical action to workflows
All checks were successful
Pull Request / changes (pull_request) Successful in 23s
Pull Request / build-and-test (pull_request) Successful in 1m49s
2026-07-13 09:25:17 -05:00
0c4fe29553 adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 17s
Pull Request / build-and-test (pull_request) Failing after 19s
2026-07-13 09:20:14 -05:00
03c4dacd99 adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 23s
Pull Request / build-and-test (pull_request) Failing after 20s
2026-07-13 09:15:51 -05:00
1ed1a6c48a adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 19s
Pull Request / build-and-test (pull_request) Failing after 16s
2026-07-13 08:51:16 -05:00
4c77ebc1d6 adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 23s
Pull Request / build-and-test (pull_request) Failing after 3s
2026-07-13 08:49:43 -05:00
650ea704aa adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 1m6s
Pull Request / build-and-test (pull_request) Failing after 2m51s
2026-07-13 08:43:03 -05:00
d51e95f59e adding infisical action to workflows
Some checks failed
Pull Request / changes (pull_request) Successful in 57s
Pull Request / build-and-test (pull_request) Failing after 4m0s
2026-07-13 08:04:16 -05:00
0806e114e1 fixing build and test workflow
All checks were successful
Main / changes (push) Successful in 18s
Main / build-and-test (push) Successful in 5m48s
Main / deploy (push) Successful in 2m28s
Tag / build (push) Successful in 5m51s
Tag / deploy (push) Successful in 2m27s
2026-05-31 06:21:20 -05:00
fc716c664b fixing build and test workflow
All checks were successful
Main / changes (push) Successful in 22s
Main / build-and-test (push) Successful in 5m46s
Main / deploy (push) Successful in 2m34s
2026-05-31 06:09:58 -05:00
5a1e24a1ce updating version to 2.1.5
All checks were successful
Main / changes (push) Successful in 26s
Main / build-and-test (push) Successful in 5m58s
Main / deploy (push) Successful in 2m33s
2026-05-31 05:51:16 -05:00
b93327f840 updating log interceptor for read role
All checks were successful
Main / changes (push) Successful in 18s
Main / build-and-test (push) Successful in 5m49s
Main / deploy (push) Successful in 2m27s
2026-05-21 08:10:48 -05:00
bbcf6cb3de updating log interceptor for read role
Some checks failed
Main / changes (push) Successful in 24s
Main / build-and-test (push) Successful in 5m49s
Main / deploy (push) Failing after 2m24s
2026-05-21 07:44:36 -05:00
344d4f5625 updating log interceptor for read role
Some checks failed
Main / changes (push) Successful in 23s
Main / build-and-test (push) Successful in 5m51s
Main / deploy (push) Failing after 21s
2026-05-21 07:35:42 -05:00
22fbf7615b updating log interceptor for read role
Some checks failed
Main / changes (push) Successful in 18s
Main / build (push) Failing after 32s
Main / deploy (push) Has been skipped
2026-05-21 07:30:57 -05:00
5a84c221d6 updating log interceptor for read role
Some checks failed
Main / changes (push) Successful in 22s
Main / build (push) Successful in 6m15s
Main / deploy (push) Failing after 18s
2026-05-20 22:12:51 -05:00
20 changed files with 148 additions and 44 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -15,12 +15,22 @@ jobs:
environment: ${{ inputs.environment_name }} environment: ${{ inputs.environment_name }}
steps: steps:
- name: Checkout - name: Checkout
uses: https://gitea.com/actions/checkout@v6 uses: actions/checkout@v4
with: with:
sparse-checkout: | sparse-checkout: |
api api
client client
- name: Get Secrets from Infisical
uses: Infisical/secrets-action@v1.0.16
with:
domain: ${{ secrets.INFISICAL_DOMAIN }}
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
project-slug: ${{ secrets.INFISICAL_PROJECT_SLUG }}
env-slug: ${{ inputs.environment_name }}
secret-path: /flying
- name: Install Nest CLI - name: Install Nest CLI
run: | run: |
npm install -g @nestjs/cli npm install -g @nestjs/cli
@@ -28,7 +38,7 @@ jobs:
- name: 'Setup Node' - name: 'Setup Node'
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: ${{ vars.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies - name: Install dependencies
run: | run: |
@@ -44,21 +54,20 @@ jobs:
- name: Build Client - name: Build Client
env: env:
VITE_API_URL: ${{ vars.VITE_API_URL }} VITE_API_URL: ${{ env.VITE_API_URL }}
VITE_BASE_URL: ${{ case(inputs.environment_name === 'test', vars.VITE_BASE_URL_TEST, vars.VITE_BASE_URL_PROD) }} VITE_BASE_URL: ${{ env.VITE_BASE_URL }}
VITE_CLIENT_ID: ${{ case(inputs.environment_name === 'test', vars.VITE_CLIENT_ID_TEST, vars.VITE_CLIENT_ID_PROD) }} VITE_CLIENT_ID: ${{ env.VITE_CLIENT_ID }}
VITE_ISSUER_URI: ${{ vars.VITE_ISSUER_URI }} VITE_ISSUER_URI: ${{ env.VITE_ISSUER_URI }}
VITE_TENANT_ID: ${{ vars.VITE_TENANT_ID }} VITE_TENANT_ID: ${{ env.VITE_TENANT_ID }}
run: | run: |
printenv
npm run build -w client npm run build -w client
- name: Log into Docker Hub - name: Log into Docker Hub
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ vars.DOCKERHUB_USERNAME }} username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ env.DOCKERHUB_TOKEN }}
- name: Setup Docker Buildx - name: Setup Docker Buildx
if: ${{ github.event_name != 'pull_request' }} if: ${{ github.event_name != 'pull_request' }}

View File

@@ -33,4 +33,6 @@ jobs:
api: api:
- 'api/**' - 'api/**'
client: client:
- 'client/**' - 'client/**'
infrastructure:
- 'infrastructure/**'

View File

@@ -15,19 +15,30 @@ on:
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: ${{ inputs.environment_name }} environment: ${{ inputs.environment_name }}
steps: steps:
- name: Log in to Azure - name: Get Secrets from Infisical
uses: azure/login@v3 uses: Infisical/secrets-action@v1.0.16
with: with:
creds: '{"clientId":"${{ vars.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ secrets.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ vars.AZURE_TENANT_ID }}"}' domain: ${{ secrets.INFISICAL_DOMAIN }}
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
project-slug: ${{ secrets.INFISICAL_PROJECT_SLUG }}
env-slug: ${{ inputs.environment_name }}
secret-path: /flying
- name: Azure CLI script - name: Install Azure CLI
uses: azure/cli@v2 run: |
with: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
azcliversion: latest
inlineScript: | - name: Log in to Azure
az containerapp update --name ${{ inputs.app_name }}-${{ inputs.environment_name }} --container-name ${{ inputs.app_name }} --resource-group noahspan --image docker.io/noahspan/${{ inputs.app_name }}:${{ inputs.version_number }} run: |
az login --service-principal --username ${{ env.AZURE_CLIENT_ID }} --password ${{ env.AZURE_CLIENT_SECRET }} --tenant ${{ env.AZURE_TENANT_ID }}
- name: Update Container App
run: |
az containerapp update --name ${{ inputs.app_name }}-${{ inputs.environment_name }} --container-name ${{ inputs.app_name }} --resource-group ${{ env.RESOURCE_GROUP }} --image docker.io/noahspan/${{ inputs.app_name }}:${{ inputs.version_number }}

View File

@@ -8,9 +8,9 @@ jobs:
changes: changes:
uses: ./.gitea/workflows/changes.yaml uses: ./.gitea/workflows/changes.yaml
build: build-and-test:
if: ${{ needs.changes.outputs.api == 'true' || needs.changes.outputs.client == 'true' }} if: ${{ needs.changes.outputs.api == 'true' || needs.changes.outputs.client == 'true' }}
name: build name: build-and-test
needs: needs:
- changes - changes
uses: ./.gitea/workflows/build_and_test.yaml uses: ./.gitea/workflows/build_and_test.yaml
@@ -23,7 +23,7 @@ jobs:
name: deploy name: deploy
needs: needs:
- changes - changes
- build - build-and-test
uses: ./.gitea/workflows/deploy.yaml uses: ./.gitea/workflows/deploy.yaml
with: with:
app_name: flying app_name: flying

View File

@@ -14,6 +14,6 @@ jobs:
- changes - changes
uses: ./.gitea/workflows/build_and_test.yaml uses: ./.gitea/workflows/build_and_test.yaml
with: with:
environment_name: pull_request environment_name: test
version_number: ${{ github.run_id }} version_number: ${{ github.run_id }}
secrets: inherit secrets: inherit

View File

@@ -5,8 +5,8 @@ on:
- '**' - '**'
jobs: jobs:
build: build-and-test:
name: build name: build-and-test
uses: ./.gitea/workflows/build_and_test.yaml uses: ./.gitea/workflows/build_and_test.yaml
with: with:
environment_name: prod environment_name: prod
@@ -16,7 +16,7 @@ jobs:
deploy: deploy:
name: deploy name: deploy
needs: needs:
- build - build-and-test
uses: ./.gitea/workflows/deploy.yaml uses: ./.gitea/workflows/deploy.yaml
with: with:
app_name: flying app_name: flying

View File

@@ -0,0 +1,44 @@
name: 'Terraform'
on:
workflow_dispatch:
inputs:
environment_name:
type: string
jobs:
terraform:
runs-on: ubuntu-latest
environment:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
infrastructure
- name: Get Secrets from Infisical
uses: Infisical/secrets-action@v1.0.16
with:
domain: ${{ secrets.INFISICAL_DOMAIN }}
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
project-slug: ${{ secrets.INFISICAL_PROJECT_SLUG }}
env-slug: ${{ inputs.environment_name }}
secret-path: /flying/terraform
- name: Setup Terraform
uses: hashicorp/setup-terraform@v4
- name: Terraform init
run: |
terraform -chdir=./infrastructure init -reconfigure -backend-config="./backend/${{ inputs.environment_name }}.backend.tfvars" -input=false
- name: Terraform plan
run: |
terraform -chdir=./infrastructure plan -no-color -input=false
# - name: Terraform apply
# if: ${{ github.event_name != 'pull_request' }}
# run: |
# terraform -chdir=./infrastructure apply -no-color -input=false

View File

@@ -1,3 +1,23 @@
# Flying (React and NestJS) # Flying
A pilot logbook app A web app for tracking pilot flight hours and sharing flight tracks.
## Built With
## Getting Started
### Prerequisites
### Installation
## Usage
## Roadmap
- [ ] Expense tracking for plane rental, instructor fees, and fuel rates
- [ ] Export logbook to CSV
- [ ]
## License
## Contact

View File

@@ -1,3 +1,4 @@
# Flying API # Flying API
An API for the Flying app. An API for the Flying app.
...

View File

@@ -1,6 +1,6 @@
{ {
"name": "api", "name": "api",
"version": "2.1.4", "version": "2.1.5",
"description": "", "description": "",
"author": "", "author": "",
"private": true, "private": true,

View File

@@ -0,0 +1 @@
...

View File

@@ -1,7 +1,7 @@
{ {
"name": "client", "name": "client",
"private": true, "private": true,
"version": "2.1.4", "version": "2.1.5",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -561,7 +561,7 @@ const Logbook: React.FC<unknown> = () => {
</div> </div>
)} )}
{!state.isLoading && state.entries.length > 0 && screenSize !== ScreenSize.SM && screenSize !== ScreenSize.MD && ( {!state.isLoading && state.entries.length > 0 && screenSize !== ScreenSize.SM && screenSize !== ScreenSize.MD && (
<div className='col-span-12 pr-5 pb-5 pl-5 bg-base-100 border border-base-100 rounded-lg '> <div className='col-span-12 pr-5 pb-5 pl-5 bg-base-100 border border-base-100 rounded-lg'>
<div className='overflow-x-auto mb-5'> <div className='overflow-x-auto mb-5'>
<div className='col-span-12 justify-self-end self-center mt-1 mr-1 mb-2'> <div className='col-span-12 justify-self-end self-center mt-1 mr-1 mb-2'>
<label className='select select-sm select-ghost'> <label className='select select-sm select-ghost'>

View File

@@ -13,6 +13,7 @@ export default defineConfig({
strictPort: true strictPort: true
}, },
server: { server: {
host: true,
port: 8080, port: 8080,
proxy: { proxy: {
'/api': { '/api': {

View File

@@ -3,15 +3,30 @@ version: '3.8'
services: services:
azurite: azurite:
container_name: azurite-flying container_name: azurite-flying
image: mcr.microsoft.com/azure-storage/azurite image: mcr.microsoft.com/azure-storage/azurite
ports: ports:
- '10000:10000' - '10000:10000'
- '10001:10001' - '10001:10001'
- '10002:10002' - '10002:10002'
command: 'azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --loose --skipApiVersionCheck' command: 'azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --loose --skipApiVersionCheck'
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "10000"]
volumes: volumes:
- ./azurite-data:/data - ./azurite-data:/data
seed:
image: mcr.microsoft.com/azure-cli
depends_on:
azurite:
condition: service_healthy
volumes:
- ./seed-data:/data
entrypoint: >
sh -c "
az storage container create --name mycontainer --connection-string 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;' &&
az storage blob upload-batch --destination mycontainer --source /data --connection-string 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;'
"
restore: restore:
container_name: restore container_name: restore
image: litestream/litestream:0.3.13 image: litestream/litestream:0.3.13
@@ -51,6 +66,7 @@ services:
condition: service_started condition: service_started
volumes: volumes:
# azurite-data: azurite-data:
backup: backup:
data: data:
seed-data:

View File

@@ -0,0 +1 @@
container_name = "tfstate-flying-prod"

View File

@@ -0,0 +1 @@
container_name = "tfstate-flying-test"

View File

@@ -16,12 +16,9 @@ terraform {
} }
} }
backend "remote" { backend "azurerm" {
hostname = "app.terraform.io" resource_group_name = "noahspan"
organization = "noahspan" storage_account_name = "noahspanterraform"
key = "terraform.tfstate"
workspaces {
prefix = "noahspan-"
}
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@noahspan/flying", "name": "@noahspan/flying",
"version": "2.1.4", "version": "2.1.5",
"scripts": { "scripts": {
"start": "node api/dist/main", "start": "node api/dist/main",
"format": "prettier --write \"**/src/**/*.ts\" \"**/test/**/*.ts\"", "format": "prettier --write \"**/src/**/*.ts\" \"**/test/**/*.ts\"",