Created
April 10, 2020 23:19
-
-
Save domingoladron/755041036aabbcaac258dfe9fdfd30d4 to your computer and use it in GitHub Desktop.
pulumi-ecs-fargate-example-task-definition.ts
This file contains hidden or 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
| //create our ecs task (with docker build of our container) | |
| const taskDefinition = new awsx.ecs.FargateTaskDefinition("pulumi-ecs-primary", { | |
| containers: { | |
| sampleapp: { | |
| image: awsx.ecs.Image.fromDockerBuild(repo, { | |
| context: "../src/", | |
| dockerfile: "../src/MyApi/MyApi.Service/AWS.Dockerfile", | |
| }), | |
| portMappings: [listener], | |
| //we can even add environment variables to our task's container | |
| environment: [ | |
| { | |
| name: "SOME_ENV_VARIABLE", | |
| value: "SOME_VALUE" | |
| } | |
| ], | |
| }, | |
| }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment