Compare commits
8 Commits
feature/15
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f132d73b92 | |||
| a7f8bd06a7 | |||
| 6f7a3965a7 | |||
| c75b3e28da | |||
| 299da631cb | |||
| b2bd0de4dc | |||
| 01e180e8f3 | |||
| 9e9384b808 |
70
.github/workflows/app_build.yaml
vendored
Normal file
70
.github/workflows/app_build.yaml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
name: 'App Build'
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
environment_name:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
version_number:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
env:
|
||||||
|
VITE_API_URL: ${{ vars.VITE_API_URL }}
|
||||||
|
VITE_CLIENT_ID: ${{ vars.VITE_CLIENT_ID }}
|
||||||
|
VITE_TENANT_ID: ${{ vars.VITE_TENANT_ID }}
|
||||||
|
VITE_REDIRECT_URL: ${{ vars.VITE_REDIRECT_URL }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: ${{ inputs.environment_name }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
sparse-checkout: |
|
||||||
|
app
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 10
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: 'Setup Node'
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ vars.NODE_VERSION }}
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
pnpm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
pnpm --filter app build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
pnpm --filter app --prod deploy ./.prod/app
|
||||||
|
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log into Docker Hub
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push to registry
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: noahspan/root-app:${{ inputs.version_number }}
|
||||||
|
context: .
|
||||||
|
target: app
|
||||||
101
.github/workflows/app_build_deploy.yaml
vendored
101
.github/workflows/app_build_deploy.yaml
vendored
@@ -1,101 +0,0 @@
|
|||||||
name: 'App Build'
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
environment_name:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
version_number:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
|
|
||||||
env:
|
|
||||||
VITE_API_URL: ${{ vars.VITE_API_URL }}
|
|
||||||
VITE_CLIENT_ID: ${{ vars.VITE_CLIENT_ID }}
|
|
||||||
VITE_TENANT_ID: ${{ vars.VITE_TENANT_ID }}
|
|
||||||
VITE_REDIRECT_URL: ${{ vars.VITE_REDIRECT_URL }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: ${{ inputs.environment_name }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
sparse-checkout: |
|
|
||||||
app
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
name: Install pnpm
|
|
||||||
with:
|
|
||||||
version: 10
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: 'Setup Node'
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ vars.NODE_VERSION }}
|
|
||||||
|
|
||||||
- name: Install
|
|
||||||
run: |
|
|
||||||
pnpm install
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
pnpm --filter app build
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
uses: azure/login@v2
|
|
||||||
with:
|
|
||||||
client-id: ${{ vars.VITE_CLIENT_ID }}
|
|
||||||
tenant-id: ${{ vars.VITE_TENANT_ID }}
|
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
||||||
|
|
||||||
- name: Upload
|
|
||||||
if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
uses: azure/CLI@v1
|
|
||||||
with:
|
|
||||||
inlineScript: |
|
|
||||||
az storage blob upload-batch --account-name ${{ vars.AZURE_STORAGE_ACCOUNT_NAME }} --auth-mode key -d '$web' -s ./app/dist
|
|
||||||
|
|
||||||
# - name: Purge CDN endpoint
|
|
||||||
# if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
# uses: azure/CLI@v1
|
|
||||||
# with:
|
|
||||||
# inlineScript: |
|
|
||||||
# az cdn endpoint purge --content-paths "/*" --profile-name "CDN_PROFILE_NAME" --name "CDN_ENDPOINT" --resource-group "RESOURCE_GROUP"
|
|
||||||
|
|
||||||
- name: Azure CLI logout
|
|
||||||
if: ${{ inputs.environment_name != 'pull_request' }}
|
|
||||||
run: |
|
|
||||||
az logout
|
|
||||||
|
|
||||||
# - name: Deploy
|
|
||||||
# if: ${{ github.event_name != 'pull_request' }}
|
|
||||||
# run: |
|
|
||||||
# pnpm --filter app --prod deploy ./.prod/app
|
|
||||||
|
|
||||||
# - name: Setup Docker Buildx
|
|
||||||
# if: ${{ github.event_name != 'pull_request' }}
|
|
||||||
# uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
# - name: Log into Docker Hub
|
|
||||||
# if: ${{ github.event_name != 'pull_request' }}
|
|
||||||
# uses: docker/login-action@v3
|
|
||||||
# with:
|
|
||||||
# username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
||||||
# password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
# - name: Build and push to registry
|
|
||||||
# if: ${{ github.event_name != 'pull_request' }}
|
|
||||||
# uses: docker/build-push-action@v6
|
|
||||||
# with:
|
|
||||||
# push: true
|
|
||||||
# tags: noahspan/root-app:${{ inputs.version_number }}
|
|
||||||
# context: .
|
|
||||||
# target: app
|
|
||||||
26
.github/workflows/main.yaml
vendored
26
.github/workflows/main.yaml
vendored
@@ -31,25 +31,25 @@ jobs:
|
|||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-deploy-app:
|
build-app:
|
||||||
if: ${{ needs.changes.outputs.app == 'true' }}
|
if: ${{ needs.changes.outputs.app == 'true' }}
|
||||||
name: build-app
|
name: build-app
|
||||||
needs:
|
needs:
|
||||||
- changes
|
- changes
|
||||||
uses: ./.github/workflows/app_build_deploy.yaml
|
uses: ./.github/workflows/app_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: test
|
environment_name: test
|
||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# deploy-app:
|
deploy-app:
|
||||||
# name: deploy-app
|
name: deploy-app
|
||||||
# needs:
|
needs:
|
||||||
# - changes
|
- changes
|
||||||
# - build-app
|
- build-app
|
||||||
# uses: ./.github/workflows/deploy.yaml
|
uses: ./.github/workflows/deploy.yaml
|
||||||
# with:
|
with:
|
||||||
# app_name: root-app
|
app_name: root-app
|
||||||
# environment_name: test
|
environment_name: test
|
||||||
# version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
# secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
2
.github/workflows/pull_request.yaml
vendored
2
.github/workflows/pull_request.yaml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
name: build-app
|
name: build-app
|
||||||
needs:
|
needs:
|
||||||
- changes
|
- changes
|
||||||
uses: ./.github/workflows/app_build_deploy.yaml
|
uses: ./.github/workflows/app_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: pull_request
|
environment_name: pull_request
|
||||||
version_number: ${{ github.run_id }}
|
version_number: ${{ github.run_id }}
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
|
||||||
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
|
||||||
|
|
||||||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
|
||||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
|
||||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
|
||||||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
|
||||||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
|
||||||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
|
||||||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
|
||||||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
|
||||||
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
|
|
||||||
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
|
||||||
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
|
|
||||||
</p>
|
|
||||||
<!--[](https://opencollective.com/nest#backer)
|
|
||||||
[](https://opencollective.com/nest#sponsor)-->
|
|
||||||
|
|
||||||
## Description
|
|
||||||
|
|
||||||
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running the app
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# development
|
|
||||||
$ npm run start
|
|
||||||
|
|
||||||
# watch mode
|
|
||||||
$ npm run start:dev
|
|
||||||
|
|
||||||
# production mode
|
|
||||||
$ npm run start:prod
|
|
||||||
```
|
|
||||||
|
|
||||||
## Test
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# unit tests
|
|
||||||
$ npm run test
|
|
||||||
|
|
||||||
# e2e tests
|
|
||||||
$ npm run test:e2e
|
|
||||||
|
|
||||||
# test coverage
|
|
||||||
$ npm run test:cov
|
|
||||||
```
|
|
||||||
|
|
||||||
## Support
|
|
||||||
|
|
||||||
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
|
||||||
|
|
||||||
## Stay in touch
|
|
||||||
|
|
||||||
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
|
|
||||||
- Website - [https://nestjs.com](https://nestjs.com/)
|
|
||||||
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Nest is [MIT licensed](LICENSE).
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -1,50 +1 @@
|
|||||||
# React + TypeScript + Vite
|
# APP
|
||||||
|
|
||||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
||||||
|
|
||||||
Currently, two official plugins are available:
|
|
||||||
|
|
||||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
||||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
||||||
|
|
||||||
## Expanding the ESLint configuration
|
|
||||||
|
|
||||||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
||||||
|
|
||||||
- Configure the top-level `parserOptions` property like this:
|
|
||||||
|
|
||||||
```js
|
|
||||||
export default tseslint.config({
|
|
||||||
languageOptions: {
|
|
||||||
// other options...
|
|
||||||
parserOptions: {
|
|
||||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
||||||
tsconfigRootDir: import.meta.dirname,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
|
|
||||||
- Optionally add `...tseslint.configs.stylisticTypeChecked`
|
|
||||||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
|
|
||||||
|
|
||||||
```js
|
|
||||||
// eslint.config.js
|
|
||||||
import react from 'eslint-plugin-react'
|
|
||||||
|
|
||||||
export default tseslint.config({
|
|
||||||
// Set the react version
|
|
||||||
settings: { react: { version: '18.3' } },
|
|
||||||
plugins: {
|
|
||||||
// Add the react plugin
|
|
||||||
react,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
// other rules...
|
|
||||||
// Enable its recommended rules
|
|
||||||
...react.configs.recommended.rules,
|
|
||||||
...react.configs['jsx-runtime'].rules,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
```
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "app",
|
"name": "app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"@azure/msal-browser": "^4.2.1",
|
"@azure/msal-browser": "^4.2.1",
|
||||||
"@azure/msal-react": "^3.0.4",
|
"@azure/msal-react": "^3.0.4",
|
||||||
"@microsoft/microsoft-graph-types": "^2.40.0",
|
"@microsoft/microsoft-graph-types": "^2.40.0",
|
||||||
"@noahspan/noahspan-components": "^1.7.5",
|
"@noahspan/noahspan-components": "^1.8.1",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ import {
|
|||||||
Grid,
|
Grid,
|
||||||
Icon,
|
Icon,
|
||||||
IconName,
|
IconName,
|
||||||
Spinner,
|
Skeleton,
|
||||||
|
Stack,
|
||||||
Typography
|
Typography
|
||||||
} from '@noahspan/noahspan-components';
|
} from '@noahspan/noahspan-components';
|
||||||
import { useIsAuthenticated } from '@azure/msal-react';
|
import { useIsAuthenticated } from '@azure/msal-react';
|
||||||
@@ -37,8 +38,8 @@ const Projects = () => {
|
|||||||
`api/projects`,
|
`api/projects`,
|
||||||
);
|
);
|
||||||
const projects: Project[] = response.data;
|
const projects: Project[] = response.data;
|
||||||
console.log(projects);
|
|
||||||
projects.sort((a, b) => Number(a.order) - Number(b.order))
|
projects.sort((a, b) => Number(a.order) - Number(b.order));
|
||||||
|
|
||||||
return projects;
|
return projects;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -125,7 +126,15 @@ const Projects = () => {
|
|||||||
dispatch({ type: 'SET_IS_LOADING', payload: true })
|
dispatch({ type: 'SET_IS_LOADING', payload: true })
|
||||||
const projects = await getProjects();
|
const projects = await getProjects();
|
||||||
|
|
||||||
dispatch({ type: 'SET_PROJECTS', payload: projects })
|
if (projects.length > 0) {
|
||||||
|
dispatch({ type: 'SET_PROJECTS', payload: projects });
|
||||||
|
|
||||||
|
if (state.alert) {
|
||||||
|
dispatch({ type: 'SET_ALERT', payload: undefined })
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dispatch({ type: 'SET_ALERT', payload: { severity: 'info', message: 'No projects found.'}});
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'SET_ALERT',
|
type: 'SET_ALERT',
|
||||||
@@ -221,22 +230,42 @@ const Projects = () => {
|
|||||||
}
|
}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</CardActions>
|
</CardActions>
|
||||||
</Card>
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
{state.isLoading && (
|
{state.isLoading && [...Array(6)].map((_element, index) => {
|
||||||
<>
|
return (
|
||||||
<Grid display="flex" justifyContent="center" size={12}>
|
<Grid display='flex' justifyContent='center' size={12}>
|
||||||
<Spinner />
|
<Card
|
||||||
|
key={index}
|
||||||
|
sx={{
|
||||||
|
width: '100%'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CardContent>
|
||||||
|
<Grid container spacing={2}>
|
||||||
|
<Grid size={1}>
|
||||||
|
<Skeleton height={100} width={60} />
|
||||||
|
</Grid>
|
||||||
|
<Grid size={11}>
|
||||||
|
<Stack>
|
||||||
|
<Skeleton height={60} />
|
||||||
|
<Skeleton height={30} />
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
<Grid size={12}>
|
||||||
|
<Skeleton />
|
||||||
|
<Skeleton />
|
||||||
|
<Skeleton />
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid display="flex" justifyContent="center" size={12}>
|
)
|
||||||
Loading projects slowly...
|
})}
|
||||||
</Grid>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Grid>
|
</Grid>
|
||||||
{state.isFormOpen &&
|
{state.isFormOpen &&
|
||||||
<ProjectForm
|
<ProjectForm
|
||||||
|
|||||||
11
infrastructure/config/container_app_environment/main.tf
Normal file
11
infrastructure/config/container_app_environment/main.tf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
locals {
|
||||||
|
name = {
|
||||||
|
test = "noahspan-test"
|
||||||
|
prod = "noahspan-prod"
|
||||||
|
}
|
||||||
|
|
||||||
|
log_analytics_workspace_name = {
|
||||||
|
test = "noahspan-log-analytics-workspace-test"
|
||||||
|
prod = "noahspan-log-analytics-workspace-prod"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
output "name" {
|
||||||
|
value = local.name[var.environment]
|
||||||
|
}
|
||||||
|
|
||||||
|
output "log_analytics_workspace_name" {
|
||||||
|
value = local.log_analytics_workspace_name[var.environment]
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
variable "environment" {}
|
||||||
@@ -1,82 +1,4 @@
|
|||||||
locals {
|
module "container_app_environment" {
|
||||||
container_app_app_name = {
|
source = "./container_app_environment"
|
||||||
test = "root-app-test"
|
environment = var.environment
|
||||||
prod = "root-app-prod"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_app_container_image = {
|
|
||||||
test = "noahspan/root-app:v1.0.0"
|
|
||||||
prod = "noahspan/root-app:v1.0.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_app_container_name = {
|
|
||||||
test = "root-app-test"
|
|
||||||
prod = "root-app-prod"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_api_name = {
|
|
||||||
test = "root-api-test"
|
|
||||||
prod = "root-api-prod"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_api_container_image = {
|
|
||||||
test = "noahspan/root-api:v1.0.0"
|
|
||||||
prod = "noahspan/root-api:v1.0.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_api_container_name = {
|
|
||||||
test = "root-api-test"
|
|
||||||
prod = "root-api-prod"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_api_dapr_app_id = {
|
|
||||||
test = "rootapitest"
|
|
||||||
prod = "rootpapiprod"
|
|
||||||
}
|
|
||||||
|
|
||||||
container_app_environment_name = {
|
|
||||||
test = "root-test"
|
|
||||||
prod = "root-prod"
|
|
||||||
}
|
|
||||||
|
|
||||||
custom_domain_count = {
|
|
||||||
test = 0
|
|
||||||
prod = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
log_analytics_workspace_name = {
|
|
||||||
test = "root-log-analytics-workspace-test"
|
|
||||||
prod = "root-log-analytics-workspace-prod"
|
|
||||||
}
|
|
||||||
|
|
||||||
static_websites = {
|
|
||||||
test = [
|
|
||||||
{
|
|
||||||
error_404_document = "custom_not_found.html"
|
|
||||||
index_document = "index.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
storage_account_name = {
|
|
||||||
test = "noahspanroottest"
|
|
||||||
prod = "noahspanrootprod"
|
|
||||||
}
|
|
||||||
|
|
||||||
storage_blobs = {
|
|
||||||
test = [
|
|
||||||
{
|
|
||||||
name = "web"
|
|
||||||
storage_container_name = "$web"
|
|
||||||
type = "Block"
|
|
||||||
content_type = "text/html"
|
|
||||||
source = "index.html"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
storage_tables = {
|
|
||||||
test = ["projects"]
|
|
||||||
prod = ["projects"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,55 +1,3 @@
|
|||||||
output "container_app_app_name" {
|
output "container_app_environment" {
|
||||||
value = local.container_app_app_name[var.environment]
|
value = module.container_app_environment
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_app_container_image" {
|
|
||||||
value = local.container_app_app_container_image[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_app_container_name" {
|
|
||||||
value = local.container_app_app_container_name[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_api_name" {
|
|
||||||
value = local.container_app_api_name[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_api_container_image" {
|
|
||||||
value = local.container_app_api_container_image[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_api_container_name" {
|
|
||||||
value = local.container_app_api_container_name[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_api_dapr_app_id" {
|
|
||||||
value = local.container_app_api_dapr_app_id[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "container_app_environment_name" {
|
|
||||||
value = local.container_app_environment_name[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "custom_domain_count" {
|
|
||||||
value = local.custom_domain_count[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "log_analytics_workspace_name" {
|
|
||||||
value = local.log_analytics_workspace_name[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "static_websites" {
|
|
||||||
value = local.static_websites[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "storage_account_name" {
|
|
||||||
value = local.storage_account_name[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "storage_blobs" {
|
|
||||||
value = local.storage_blobs[var.environment]
|
|
||||||
}
|
|
||||||
|
|
||||||
output "storage_tables" {
|
|
||||||
value = local.storage_tables[var.environment]
|
|
||||||
}
|
}
|
||||||
@@ -1,31 +1,40 @@
|
|||||||
module "storage" {
|
# module "storage" {
|
||||||
source = "github.com/noahspannbauer/noahspan-terraform/modules/storage"
|
# source = "github.com/noahspannbauer/noahspan-terraform/modules/storage"
|
||||||
resource_group_name = var.RESOURCE_GROUP_NAME
|
# resource_group_name = var.RESOURCE_GROUP_NAME
|
||||||
static_websites = module.environment.static_websites
|
# static_websites = module.environment.static_websites
|
||||||
storage_account_name = module.environment.storage_account_name
|
# storage_account_name = module.environment.storage_account_name
|
||||||
storage_blobs = module.environment.storage_blobs
|
# storage_blobs = module.environment.storage_blobs
|
||||||
storage_tables = module.environment.storage_tables
|
# storage_tables = module.environment.storage_tables
|
||||||
}
|
# }
|
||||||
|
|
||||||
module "container_app" {
|
# module "container_app" {
|
||||||
source = "github.com/noahspannbauer/noahspan-terraform/modules/container_app"
|
# source = "github.com/noahspannbauer/noahspan-terraform/modules/container_app"
|
||||||
app_subdomain_name = var.APP_SUBDOMAIN_NAME
|
# app_subdomain_name = var.APP_SUBDOMAIN_NAME
|
||||||
client_id = var.CLIENT_ID
|
# client_id = var.CLIENT_ID
|
||||||
client_secret = var.CLIENT_SECRET
|
# client_secret = var.CLIENT_SECRET
|
||||||
container_app_app_name = module.environment.container_app_app_name
|
# container_app_app_name = module.environment.container_app_app_name
|
||||||
container_app_app_container_image = module.environment.container_app_api_container_image
|
# container_app_app_container_image = module.environment.container_app_api_container_image
|
||||||
container_app_app_container_name = module.environment.container_app_api_container_name
|
# container_app_app_container_name = module.environment.container_app_api_container_name
|
||||||
container_app_api_name = module.environment.container_app_api_name
|
# container_app_api_name = module.environment.container_app_api_name
|
||||||
container_app_api_container_image = module.environment.container_app_api_container_image
|
# container_app_api_container_image = module.environment.container_app_api_container_image
|
||||||
container_app_api_container_name = module.environment.container_app_api_container_name
|
# container_app_api_container_name = module.environment.container_app_api_container_name
|
||||||
container_app_environment_name = module.environment.container_app_environment_name
|
# container_app_environment_name = module.environment.container_app_environment_name
|
||||||
custom_domain_count = module.environment.custom_domain_count
|
# custom_domain_count = module.environment.custom_domain_count
|
||||||
dns_zone_resource_group = var.DNS_ZONE_RESOURCE_GROUP
|
# dns_zone_resource_group = var.DNS_ZONE_RESOURCE_GROUP
|
||||||
docker_io_password = var.DOCKER_IO_PASSWORD
|
# docker_io_password = var.DOCKER_IO_PASSWORD
|
||||||
docker_io_username = var.DOCKER_IO_USERNAME
|
# docker_io_username = var.DOCKER_IO_USERNAME
|
||||||
domain_name = var.DOMAIN_NAME
|
# domain_name = var.DOMAIN_NAME
|
||||||
log_analytics_workspace_name = module.environment.log_analytics_workspace_name
|
# log_analytics_workspace_name = module.environment.log_analytics_workspace_name
|
||||||
|
# resource_group_name = var.RESOURCE_GROUP_NAME
|
||||||
|
# storage_account_primary_connection_string = module.storage.storage_account_primary_connection_string
|
||||||
|
# tenant_id = var.TENANT_ID
|
||||||
|
# }
|
||||||
|
|
||||||
|
module "container_app_environment" {
|
||||||
|
source = "github.com/noahspannbauer/noahspan-terraform/modules/container_app_environment"
|
||||||
|
container_app_environment_name = module.environment.container_app_environment.name
|
||||||
|
log_analytics_workspace_name = module.environment.container_app_environment.log_analytics_workspace_name
|
||||||
|
log_analytics_workspace_retention_in_days = 30
|
||||||
|
log_analytics_workspace_sku = "PerGB2018"
|
||||||
resource_group_name = var.RESOURCE_GROUP_NAME
|
resource_group_name = var.RESOURCE_GROUP_NAME
|
||||||
storage_account_primary_connection_string = module.storage.storage_account_primary_connection_string
|
|
||||||
tenant_id = var.TENANT_ID
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
terraform {
|
terraform {
|
||||||
required_version = ">= 1.1.0"
|
required_version = ">= 1.13.0"
|
||||||
|
|
||||||
required_providers {
|
required_providers {
|
||||||
azurerm = {
|
azurerm = {
|
||||||
|
|||||||
@@ -1,20 +1,3 @@
|
|||||||
variable "APP_SUBDOMAIN_NAME" {
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "CLIENT_ID" {
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "CLIENT_SECRET" {
|
|
||||||
type = string
|
|
||||||
sensitive = true
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "DNS_ZONE_RESOURCE_GROUP" {
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "DOCKER_IO_PASSWORD" {
|
variable "DOCKER_IO_PASSWORD" {
|
||||||
type = string
|
type = string
|
||||||
sensitive = true
|
sensitive = true
|
||||||
@@ -24,10 +7,6 @@ variable "DOCKER_IO_USERNAME" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "DOMAIN_NAME" {
|
|
||||||
type = string
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "RESOURCE_GROUP_NAME" {
|
variable "RESOURCE_GROUP_NAME" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -134,8 +134,8 @@ importers:
|
|||||||
specifier: ^2.40.0
|
specifier: ^2.40.0
|
||||||
version: 2.40.0
|
version: 2.40.0
|
||||||
'@noahspan/noahspan-components':
|
'@noahspan/noahspan-components':
|
||||||
specifier: ^1.7.5
|
specifier: ^1.8.1
|
||||||
version: 1.7.5(@mui/system@6.4.3(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react-dom@19.0.3(@types/react@19.0.8))(@types/react@19.0.8)(jquery@3.7.1)(less@4.2.2)(moment@2.30.1)(postcss@8.5.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.5.4(prettier@3.5.0))(typescript@5.7.3)(webpack@5.98.0(esbuild@0.18.20))
|
version: 1.8.1(@mui/system@6.4.3(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react-dom@19.0.3(@types/react@19.0.8))(@types/react@19.0.8)(jquery@3.7.1)(less@4.2.2)(moment@2.30.1)(postcss@8.5.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.5.4(prettier@3.5.0))(typescript@5.7.3)(webpack@5.98.0(esbuild@0.18.20))
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.7.9
|
specifier: ^1.7.9
|
||||||
version: 1.7.9
|
version: 1.7.9
|
||||||
@@ -1616,8 +1616,8 @@ packages:
|
|||||||
'@nestjs/common': ^9.0.0 || ^10.0.0
|
'@nestjs/common': ^9.0.0 || ^10.0.0
|
||||||
'@nestjs/core': ^9.0.0 || ^10.0.0
|
'@nestjs/core': ^9.0.0 || ^10.0.0
|
||||||
|
|
||||||
'@noahspan/noahspan-components@1.7.5':
|
'@noahspan/noahspan-components@1.8.1':
|
||||||
resolution: {integrity: sha512-udxXiYI0GLL2Jo9jqc981BYLXQK3cxkwioA90o1cIXhN85ZT/8uRZr5gS/eMGzlctnRU5s5M4kQEns1Ry35m0Q==}
|
resolution: {integrity: sha512-x+h9tc6Jp54WP4oKxbEeHuzjWVd1emJaKTfh/uMGYyXJFeCdWFfWdFgHsAEGmVnUn0ZpQLctWqi+t6/ix3KgnA==}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^18.2.0
|
react: ^18.2.0
|
||||||
@@ -7520,7 +7520,7 @@ snapshots:
|
|||||||
- stream-browserify
|
- stream-browserify
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@noahspan/noahspan-components@1.7.5(@mui/system@6.4.3(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react-dom@19.0.3(@types/react@19.0.8))(@types/react@19.0.8)(jquery@3.7.1)(less@4.2.2)(moment@2.30.1)(postcss@8.5.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.5.4(prettier@3.5.0))(typescript@5.7.3)(webpack@5.98.0(esbuild@0.18.20))':
|
'@noahspan/noahspan-components@1.8.1(@mui/system@6.4.3(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@emotion/styled@11.14.0(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0))(@types/react-dom@19.0.3(@types/react@19.0.8))(@types/react@19.0.8)(jquery@3.7.1)(less@4.2.2)(moment@2.30.1)(postcss@8.5.2)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(storybook@8.5.4(prettier@3.5.0))(typescript@5.7.3)(webpack@5.98.0(esbuild@0.18.20))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emotion/react': 11.14.0(@types/react@19.0.8)(react@19.0.0)
|
'@emotion/react': 11.14.0(@types/react@19.0.8)(react@19.0.0)
|
||||||
'@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0)
|
'@emotion/styled': 11.14.0(@emotion/react@11.14.0(@types/react@19.0.8)(react@19.0.0))(@types/react@19.0.8)(react@19.0.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user