Skip to content

Commit eafaae0

Browse files
committed
feat(sst): Add sst configuration for AWS deploy
1 parent 1470b89 commit eafaae0

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

sst-env.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* This file is auto-generated by SST. Do not edit. */
2+
/* tslint:disable */
3+
/* eslint-disable */
4+
/* deno-fmt-ignore-file */
5+
6+
declare module "sst" {
7+
export interface Resource {
8+
"AuthService": {
9+
"service": string
10+
"type": "sst.aws.Service"
11+
"url": string
12+
}
13+
"AuthVpc": {
14+
"type": "sst.aws.Vpc"
15+
}
16+
}
17+
}
18+
/// <reference path="sst-env.d.ts" />
19+
20+
import "sst"
21+
export {}

sst.config.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// <reference path="./.sst/platform/config.d.ts" />
2+
3+
export default {
4+
app: (input) => ({
5+
name: "auth-lab",
6+
removal: input.stage === "production" ? "retain" : "remove",
7+
protect: input.stage === "production",
8+
home: "aws",
9+
}),
10+
11+
async run() {
12+
const vpc = new sst.aws.Vpc("AuthVpc");
13+
const cluster = new sst.aws.Cluster("AuthCluster", { vpc });
14+
15+
new sst.aws.Service("AuthService", {
16+
cluster,
17+
image: "Dockerfile",
18+
loadBalancer: {
19+
ports: [{ listen: "3000/http" }],
20+
},
21+
dev: {
22+
command: "npm run dev",
23+
},
24+
});
25+
}
26+
};

0 commit comments

Comments
 (0)