adds goatcounter
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# !create
|
||||
db/
|
||||
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
goatcounter:
|
||||
image: baethon/goatcounter
|
||||
restart: unless-stopped
|
||||
container_name: goatcounter
|
||||
command: >-
|
||||
goatcounter serve
|
||||
-listen :8080
|
||||
-tls none
|
||||
-db sqlite3+/goatcounter/db/goatcounter.sqlite3
|
||||
volumes:
|
||||
- ./db:/goatcounter/db
|
||||
networks:
|
||||
- shared
|
||||
|
||||
networks:
|
||||
shared:
|
||||
external: true
|
||||
@@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name goatcounter.hantim.net;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://goatcounter.hantim.net$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
http2 on;
|
||||
server_name goatcounter.hantim.net;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/goatcounter.hantim.net/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/goatcounter.hantim.net/privkey.pem;
|
||||
|
||||
include /etc/nginx/conf.d/security-headers.inc;
|
||||
|
||||
location / {
|
||||
proxy_pass http://goatcounter:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user