Created
November 23, 2014 23:41
-
-
Save adamgins/0c0258d6e1b8203fd051 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
option_settings: | |
- option_name: AWS_SECRET_KEY | |
value: <SOMESECRET> | |
- option_name: AWS_ACCESS_KEY_ID | |
value: <SOMEKEY> | |
- option_name: PORT | |
value: 8081 | |
- option_name: ROOT_URL | |
value: <SOMEURL> | |
- option_name: MONGO_URL | |
value: <SOMEMONGOURL> | |
- namespace: aws:elasticbeanstalk:container:nodejs | |
option_name: ProxyServer | |
value: nginx | |
option_name: GzipCompression | |
value: true | |
- namespace: aws:elasticbeanstalk:container:nodejs:staticfiles | |
option_name: /public | |
value: /public | |
container_commands: | |
01_nginx_static: | |
command: | | |
sed '/\s*location\s*\/.*/i \ | |
location ~ ^/(images/|img/|javascript/|js/|css/|stylesheets/|font/|fonts/|flash/|media/|static/|robots.txt|humans.txt|favicon.ico) {\ | |
root /var/app/current/bundle/static;\ | |
access_log off;\ | |
expires max;\ | |
proxy_set_header Upgrade $http_upgrade;\ | |
proxy_set_header Connection "upgrade";\ | |
proxy_set_header Host $host;\ | |
}\ | |
\ | |
location ~* \.(js|css)$ {\ | |
root /var/app/current/bundle/static_cacheable;\ | |
access_log off;\ | |
expires max;\ | |
proxy_set_header Upgrade $http_upgrade;\ | |
proxy_set_header Connection "upgrade";\ | |
proxy_set_header Host $host;\ | |
}\ | |
' /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment