3857 - Simple Spherical Mercator projection coordinate system
4326 - Geographic coordinate system
- ST_Transform: Return a new geometry with its coordinates transformed to a different spatial reference.
| # based on https://medium.com/matic-insurance/how-to-make-ruby-on-rails-activeadmin-and-large-postgresql-tables-friends-again-af199b96f25 | |
| module EstimatedCount | |
| extend ActiveSupport::Concern | |
| class_methods do | |
| def estimated_count | |
| query = <<-SQL | |
| select reltuples as estimated_count | |
| from pg_class |
3857 - Simple Spherical Mercator projection coordinate system
4326 - Geographic coordinate system
| CREATE USER $USERNAME PASSWORD $PASSWORD; | |
| GRANT USAGE ON SCHEMA $SCHEMA TO $USERNAME; | |
| GRANT SELECT ON $TABLENAME TO $USERNAME; |
| http { | |
| # nginx won't resolve URLs correctly so we have to provide google's public DNS | |
| resolver 8.8.8.8; | |
| ####################### | |
| ### Server side SSL ### | |
| ####################### | |
| # based on: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html | |
| # Test using: https://www.ssllabs.com/ssltest/ |