full-dress-10026
01/23/2019, 5:43 PMwhite-balloon-205
lemon-spoon-91807
01/23/2019, 7:00 PMfull-dress-10026
01/23/2019, 7:01 PMlemon-spoon-91807
01/23/2019, 7:03 PMfull-dress-10026
01/23/2019, 7:05 PMlemon-spoon-91807
01/23/2019, 7:06 PMfull-dress-10026
01/23/2019, 7:07 PMenvironment
variables available when the container is built?let nginxFargateService = new infra.x.ecs.FargateService("nginx", {
cluster: cluster,
taskDefinitionArgs: {
containers: {
nginx: {
image: infra.x.ecs.Image.fromDockerBuild({
cacheFrom: true,
context: "./nginx",
}),
portMappings: nginxLoadBalancer,
memory: 256,
environment: [{
name: "FOO",
value: "foo"
}]
}
}
},
desiredCount: 1
});
Is FOO
available when building the container?lemon-spoon-91807
01/23/2019, 7:12 PMfull-dress-10026
01/23/2019, 7:12 PMFOO
in my Dockerfile.lemon-spoon-91807
01/23/2019, 7:12 PMfull-dress-10026
01/23/2019, 7:13 PMlemon-spoon-91807
01/23/2019, 7:16 PMfull-dress-10026
01/23/2019, 7:17 PMlemon-spoon-91807
01/23/2019, 7:17 PMfull-dress-10026
01/23/2019, 7:18 PMevents {
worker_connections 1024;
}
http {
server {
listen 443;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
location /api {
proxy_pass {{api_url}};
proxy_ssl_server_name on;
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}
location / {
proxy_pass {{frontend_url}};
proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}
}
}
I need to fill in {{api_url}}
and {{frontend_url}}
with the values generated from Pulumi resources.ARG API_URL
ARG FRONTEND_URL
RUN sed -i "s,{{api_url}},"$API_URL",g" /etc/nginx/nginx.conf
RUN sed -i "s,{{frontend_url}},"$FRONTEND_URL",g" /etc/nginx/nginx.conf
lemon-spoon-91807
01/23/2019, 7:22 PMfull-dress-10026
01/23/2019, 7:23 PMlemon-spoon-91807
01/23/2019, 7:23 PMfull-dress-10026
01/23/2019, 7:25 PMlemon-spoon-91807
01/23/2019, 7:25 PMfull-dress-10026
01/23/2019, 7:25 PMlemon-spoon-91807
01/23/2019, 7:25 PMfull-dress-10026
01/23/2019, 7:26 PMenvironment
.