Role for installing a Nginx reverse proxy cache for your S3 repository.
While S3 is a great service to store your static assets, there is a number of benefits that you should be able to enjoy by caching these assets on a external server, such as:
- Hide your origin bucket;
- Reduce bandwidth costs;
- Lower latency.
Depending on your use case, this role might be a good option otherwise a real CDN should do.
- geerlingguy.nginx
Variables you should or might want to set, including their default values (see defaults/main.yml
):
s3_repository_url: sentinel-s2-l1c.s3.amazonaws.com
nginx_cache_valid: 3d
nginx_cache_invalid: 30s
nginx_cache_max_size: 40g
nginx_cache_inactive: 30d
Minimal playbook:
- hosts: localhost
vars:
s3_repository_url: sentinel-s2-l1c.s3.amazonaws.com
roles:
- geerlingguy.nginx
- Lusitaniae.s3-proxy
MIT