-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f579c8
commit 3d71c63
Showing
10 changed files
with
4,625 additions
and
3,901 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
/bin/ | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config: | ||
aws:region: ap-southeast-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: formsg-infra | ||
runtime: | ||
name: nodejs | ||
options: | ||
packagemanager: npm | ||
description: pulumi config for formsg | ||
config: | ||
pulumi:tags: | ||
value: | ||
pulumi:template: aws-typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as awsx from "@pulumi/awsx"; | ||
|
||
// ECR Repository used to store the Docker images built by the CI/CD pipeline on Staging-alt3 branch | ||
const formsg_staging_alt3_repo = new awsx.ecr.Repository("formsg/staging-alt3"); | ||
|
||
// Build the staging-alt3 image and push it to the ECR repository | ||
const staging_alt3_image = new awsx.ecr.Image("staging-alt3-image", { | ||
repositoryUrl: formsg_staging_alt3_repo.url, | ||
platform: "linux/amd64", | ||
context: './app' | ||
}) | ||
|
||
export const staging_alt3_image_uri = staging_alt3_image.imageUri; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as awsx from "@pulumi/awsx"; | ||
import * as aws from "@pulumi/aws"; | ||
import * as pulumi from "@pulumi/pulumi"; | ||
import { staging_alt3_image_uri } from "./ecr"; | ||
|
||
// Required to access container over port 80 using a stable IP address | ||
const lb = new awsx.lb.ApplicationLoadBalancer("formsg-staging-alt3-lb"); | ||
|
||
const cluster = new aws.ecs.Cluster("formsg-staging-alt3-cluster"); | ||
|
||
const service = new awsx.ecs.FargateService("formsg-staging-alt3-service", { | ||
cluster: cluster.arn, | ||
desiredCount: 1, | ||
assignPublicIp: true, | ||
taskDefinitionArgs: { | ||
container: { | ||
name: "formsg_staging_alt3", | ||
image: staging_alt3_image_uri, | ||
essential: true, | ||
cpu: 128, | ||
memory: 512, | ||
portMappings: [{ | ||
containerPort: 80, | ||
targetGroup: lb.defaultTargetGroup | ||
}] | ||
} | ||
} | ||
}); | ||
|
||
// uri to access the staging-alt3 service | ||
export const url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
import {} from '@opengovsg/pulumi-components' | ||
import * as aws from '@pulumi/aws' | ||
import * as pulumi from '@pulumi/pulumi' | ||
|
||
// Config goes here... | ||
import * as ecs from "./ecs"; | ||
import * as ecr from "./ecr"; |
Oops, something went wrong.