Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/namshi/docker-node-nginx-pagespeed
A simple container to...well, it's actually not that simple. Use it to run JS apps proxied by nginx. With pagespeed. Yes.
https://github.com/namshi/docker-node-nginx-pagespeed
Last synced: 1 day ago
JSON representation
A simple container to...well, it's actually not that simple. Use it to run JS apps proxied by nginx. With pagespeed. Yes.
- Host: GitHub
- URL: https://github.com/namshi/docker-node-nginx-pagespeed
- Owner: namshi
- Created: 2015-01-13T06:33:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-14T11:07:56.000Z (over 8 years ago)
- Last Synced: 2024-04-14T12:15:19.328Z (7 months ago)
- Size: 6.84 KB
- Stars: 11
- Watchers: 15
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker 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](https://developers.google.com/speed/pagespeed/) goodies
so you don't need to do it yourself in you node code :)## How to use it
Simply start your container form this one:```
# DockerfileFROM namshi/node-nginx-pagespeed
```## What it provides
- nodejs
- a simple nginx acting as a transparent proxy and including the page speed module
- clusterjs## Caches
By default the page speed cache will be written in `/var/pagespeed/cache`, mount your desired directory in that path if you need## Nginx configuration
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.## Examples
### Dockerfile
```
FROM namshi/node-nginx-pagespeedCOPY . /src
WORKDIR /src
RUN npm installCMD nginx && clusterjs src/path/to/your/app.js
```### fig.yml
```yml
web:
build: .
ports:
- "80:8080"
volumes:
- .:/src
command: bash -c 'npm install && nginx && node src/path/to/your/app.js'```
## SSL
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 :)