namshi/node-nginx-pagespeed
This is a docker container meant for nodejs apps delivering web content and aiming to an high page speed score. It includes a very simple custom build of nginx that will apply google's page speed goodies so you don't need to do it yourself in you node code :)
Simply start your container form this one:
# Dockerfile
FROM namshi/node-nginx-pagespeed
By default the page speed cache will be written in /var/pagespeed/cache
, mount your desired directory in that path if you need
Just mount your desired config file into /etc/nginx/sites-enabled/default
By default nginx will listen on the 80 port and expect your node app to listen on the 9004 port.
FROM namshi/node-nginx-pagespeed
COPY . /src
WORKDIR /src
RUN npm install
CMD nginx && clusterjs src/path/to/your/app.js
web:
build: .
ports:
- "80:8080"
volumes:
- .:/src
command: bash -c 'npm install && nginx && node src/path/to/your/app.js'
No, there's no SSL support in here. The main purpose is just to be able to use pagespeed in a simple and isolated way for the contained application. We strongly suggest you to put your very own nginx on top of this supporting SSL and everything else you might need :)
docker pull namshi/node-nginx-pagespeed