Skip to content

Commit

Permalink
Fix plugins analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix committed Sep 8, 2024
1 parent 65fae0b commit 1166c29
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 deletions.
1 change: 1 addition & 0 deletions dockerize/.env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
COMPOSE_PROJECT_NAME=qgis-plugins
# RabbitMQ host
RABBITMQ_HOST=rabbitmq

Expand Down
4 changes: 2 additions & 2 deletions dockerize/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ web-logs:
@echo "------------------------------------------------------------------"
@echo "Tailing logs in NGINX/WEB container(s)"
@echo "------------------------------------------------------------------"
@docker compose -p $(PROJECT_ID) logs -f web
@docker compose -p $(PROJECT_ID) logs -f --tail=10 web

logs:
@echo
@echo "------------------------------------------------------------------"
@echo "Tailing all logs or a specific container"
@echo "------------------------------------------------------------------"
@docker compose -p $(PROJECT_ID) logs -f $(c)
@docker compose -p $(PROJECT_ID) logs -f --tail=10 $(c)

shell:
@echo
Expand Down
28 changes: 15 additions & 13 deletions dockerize/sites-enabled/prod-ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@ upstream uwsgi {
# Define the rate limit zone: 10 requests per second for each IP address
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;

# Redirect requests on analytics.qgis.org over to the feed
# This is just a conveneience in case we ever decide to host
# metabase on its own server.
# Note that we also have a cloudflare trasnform rule in place
# which will redirect users from analytics.qgis.org over to the public dashboard
# https://dash.cloudflare.com/a2cec2d89cc90579a20a30365bedcaf7/qgis.org/rules/transform-rules
server {
listen 80;
listen 443 ssl;
server_name plugins-analytics.qgis.org;
return 301 $scheme://plugins.qgis.org$request_uri;
}

server {
# OTF gzip compression
gzip on;
Expand Down Expand Up @@ -242,4 +229,19 @@ server {
}

root /var/www/webroot;
}

# Redirect requests on analytics.qgis.org over to the feed
# This is just a conveneience in case we ever decide to host
# metabase on its own server.
# Note that we also have a cloudflare trasnform rule in place
# which will redirect users from analytics.qgis.org over to the public dashboard
# https://dash.cloudflare.com/a2cec2d89cc90579a20a30365bedcaf7/qgis.org/rules/transform-rules
server {
listen 80;
listen 443 ssl;
server_name plugins-analytics.qgis.org;
ssl_certificate /etc/letsencrypt/live/plugins-analytics.qgis.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/plugins-analytics.qgis.org/privkey.pem;
return 301 $scheme://plugins.qgis.org/org/metabase/public/dashboard/7ecd345f-7321-423d-9844-71e526a454a9;
}
26 changes: 14 additions & 12 deletions dockerize/sites-enabled/prod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ upstream uwsgi {
# Define the rate limit zone: 10 requests per second for each IP address
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;

# Redirect requests on analytics.qgis.org over to the feed
# This is just a conveneience in case we ever decide to host
# metabase on its own server.
# Note that we also have a cloudflare trasnform rule in place
# which will redirect users from analytics.qgis.org over to the public dashboard
# https://dash.cloudflare.com/a2cec2d89cc90579a20a30365bedcaf7/qgis.org/rules/transform-rules
server {
listen 80;
listen 443 ssl;
server_name plugins-analytics.qgis.org;
return 301 $scheme://plugins.qgis.org$request_uri;
}

server {
# OTF gzip compression
Expand Down Expand Up @@ -122,3 +110,17 @@ server {
allow all;
}
}

# Redirect requests on analytics.qgis.org over to the feed
# This is just a conveneience in case we ever decide to host
# metabase on its own server.
# Note that we also have a cloudflare trasnform rule in place
# which will redirect users from analytics.qgis.org over to the public dashboard
# https://dash.cloudflare.com/a2cec2d89cc90579a20a30365bedcaf7/qgis.org/rules/transform-rules
server {
listen 80;
server_name plugins-analytics.qgis.org;
ssl_certificate /etc/letsencrypt/live/plugins-analytics.qgis.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/plugins-analytics.qgis.org/privkey.pem;
return 301 $scheme://plugins.qgis.org/org/metabase/public/dashboard/7ecd345f-7321-423d-9844-71e526a454a9;
}

0 comments on commit 1166c29

Please sign in to comment.