tall-truck-58456
06/01/2021, 12:16 PMawsx.ecs.Image.fromPath
how can I pass environment variables to the docker build command?
2. Is it possible to map EFS volume to the docker container for persistency using Pulumi?
This is my current scripts (following the Fargate tutorial)
import * as awsx from '@pulumi/awsx';
import * as pulumi from '@pulumi/pulumi';
const listener = new awsx.elasticloadbalancingv2.NetworkListener('example', { port: 443 });
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const service = new awsx.ecs.FargateService('example', {
taskDefinitionArgs: {
containers: {
example: {
image: awsx.ecs.Image.fromPath('example', '/Source/example'),
memory: 2048,
portMappings: [listener],
environment: [
{
name: 'ENV',
value: 'CLOUD',
},
],
},
},
},
});
export const frontendURL = pulumi.interpolate`http://${listener.endpoint.hostname}/`;