Last active
March 21, 2023 15:19
-
-
Save nathanpeck/1ad2e5f332d77de180045df640894339 to your computer and use it in GitHub Desktop.
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
TaskDefinition: | |
Type: AWS::ECS::TaskDefinition | |
Properties: | |
Family: nginx-ingress | |
Cpu: 256 | |
Memory: 128 | |
ContainerDefinitions: | |
- Name: nginx | |
Image: public.ecr.aws/nginx/nginx:mainline | |
EntryPoint: | |
- '/bin/sh' | |
- '-c' | |
Environment: | |
- Name: MY_URL_ENV_VARIABLE | |
Vale: http://myupstreamhost.com | |
Command: | |
- > | |
echo " | |
events { | |
worker_connections 1024; | |
} | |
http | |
{ | |
upstream ingress | |
{ | |
server $MY_URL_ENV_VARIABLE; | |
} | |
server { | |
listen 8080; | |
location / | |
{ | |
proxy_pass http://ingress; | |
proxy_set_header Host \$host; | |
proxy_pass_request_headers on; | |
} | |
} | |
} | |
" > /etc/nginx/nginx.conf && | |
exec nginx -g 'daemon off;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment