Skip to main content

Posts

Showing posts from October, 2017

S3 Encrypt NodeJS upload/server files

https://cloud.google.com/solutions/mysql-remote-access https://stackoverflow.com/questions/19665863/how-do-i-use-a-self-signed-certificate-for-a-https-node-js-server https://github.com/gilt/node-s3-encryption-client https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingEncryption.html S3 encryption with customer provided key SSE-C required SSL. What does it mean ? Protect data at rest (?), at transfer. https://cloud.google.com/compute/docs/load-balancing/tcp-ssl/ https://www.aptible.com/documentation/enclave/tutorials/faq/file-uploads.html SSL sample https://github.com/coolaj86/nodejs-ssl-example But only SSE-C require SSL ? Wall of text, API reference class, property ... http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getSignedUrl-property https://github.com/badunk/multer-s3 https://medi

Bind multiple port to Docker service

https://www.digitalocean.com/community/questions/how-to-bind-multiple-domains-ports-80-and-443-to-docker-contained-applications Cool nginx reserve proxy config explain: The most basic way to expose a web app running in a Docker container to the outside is to bind port 80 in the container to port 80 on the host system: docker run -d -p 80:80 coreos/apache /usr/sbin/apache2ctl -D FOREGROUND Though when you are running multiple app that you can't have them all listen on the same port. One way to get around this would be to set up an Nginx reverse proxy in front of the containers. For example, say you have two different app. Bind them to a random port on the local host: docker run -d -p 127.0.0.1:3000:80 coreos/apache /usr/sbin/apache2ctl -D FOREGROUND docker run -d -p 127.0.0.1:5000:80 coreos/apache /usr/sbin/apache2ctl -D FOREGROUND Then you can configure an Nginx sconfiguration that looks something like this: upstream app-a {     server 127.0.0.1:3000; } upstream a