Skip to content

Commit

Permalink
Merge pull request #2 from ASCS-eV/feat/add_sst_deploy
Browse files Browse the repository at this point in the history
feat(envited.ascs.digital): Add SST for deploy on AWS
  • Loading branch information
jeroenbranje authored Dec 20, 2023
2 parents ff757ec + 273e3df commit 19534b5
Show file tree
Hide file tree
Showing 11 changed files with 29,258 additions and 19,556 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Thumbs.db

# Next.js
.next
.env
.env.dev
.env.staging
.env.production
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
## Resources
* [Miro Board](https://miro.com/app/board/uXjVNeZRbEw=/)

#### Installing dependencies

From the root directory run:

```bash
nvm ls # show installed node versions
nvm use VERSION # >= 18.17
node --version
npm install
```

## Start the app

To start the development server run `npx nx serve marketplace`. Open your browser and navigate to http://localhost:4200/. Happy coding!
To start the development server run `npx nx serve envited.ascs.digital`. Open your browser and navigate to http://localhost:4200/. Happy coding!
2 changes: 2 additions & 0 deletions apps/envited.ascs.digital/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PLATFORM='' # Database platform thats being used. Choices are 'node', 'RDS' or 'vercel'
ROLE_TO_ASSUME=''
8 changes: 8 additions & 0 deletions apps/envited.ascs.digital/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"scripts": {
"build": "next build"
},
"dependencies": {
"next": "14.0.4"
}
}
8 changes: 8 additions & 0 deletions apps/envited.ascs.digital/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"deploy:staging": {
"executor": "nx:run-commands",
"options": {
"cwd": "apps/envited.ascs.digital",
"commands": ["npx sst deploy Envited --stage staging"],
"parallel": false
}
}
},
"tags": []
Expand Down
16 changes: 16 additions & 0 deletions apps/envited.ascs.digital/sst.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { SSTConfig } from 'sst'

import Envited from './stacks/Envited'

export default {
config(_input) {
return {
name: 'envitedascsdigital',
region: 'eu-central-1',
role: process.env.ROLE_TO_ASSUME,
}
},
stacks(app) {
app.stack(Envited)
},
} satisfies SSTConfig
19 changes: 19 additions & 0 deletions apps/envited.ascs.digital/stacks/Envited.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

import { NextjsSite, StackContext } from 'sst/constructs'

export default function Envited({ stack }: StackContext) {
// Create the Next.js site
const site = new NextjsSite(stack, 'envited_ascs_digital', {
path: './',
memorySize: '1024 MB',
timeout: '20 seconds',
environment: {},
})

const metadata = site.getConstructMetadata()

// Add the site's URL to stack output
stack.addOutputs({
URL: metadata.data.url,
})
}
2 changes: 1 addition & 1 deletion apps/envited.ascs.digital/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"**/*.js",
"**/*.jsx",
".next/types/**/*.ts",
"../../dist/apps/marketplace/.next/types/**/*.ts",
"../../dist/apps/envited.ascs.digital/.next/types/**/*.ts",
"next-env.d.ts",
".next/types/**/*.ts",
"../../dist/apps/envited.ascs.digital/.next/types/**/*.ts"
Expand Down
Loading

0 comments on commit 19534b5

Please sign in to comment.