1
0

精简提交历史记录

This commit is contained in:
okxlin
2023-11-09 19:15:01 +08:00
commit 691aa7aac9
1529 changed files with 800341 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
CONTAINER_NAME="matomo"
PANEL_APP_PORT_HTTP="40077"
DATA_PATH="./data"
PANEL_DB_HOST="127.0.0.1"
PANEL_DB_NAME="matomo"
PANEL_DB_USER="matomo"
PANEL_DB_USER_PASSWORD="MyDBPWD_brls9UwcRasl"
PANEL_DB_PREFIX="matomo_"

View File

@@ -0,0 +1,68 @@
additionalProperties:
formFields:
- child:
default: ""
envKey: PANEL_DB_HOST
labelEn: Database Service
labelZh: 数据库服务
required: true
type: service
default: mysql
labelEn: Database Service
labelZh: 数据库服务
params:
- envKey: MATOMO_DB_PORT
key: mysql
type: param
value: "3306"
required: true
type: apps
values:
- label: MySQL
value: mysql
- default: matomo
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
- default: matomo
envKey: PANEL_DB_USER
labelEn: User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
- default: matomo
envKey: PANEL_DB_USER_PASSWORD
labelEn: Password
labelZh: 数据库用户密码
random: true
required: true
rule: paramComplexity
type: password
- default: matomo_
envKey: PANEL_DB_PREFIX
labelEn: Database prefix
labelZh: 数据库前缀
required: true
type: text
- default: 40077
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: DATA_PATH
labelEn: Data storage folder
labelZh: 数据存放文件夹
required: true
type: text

View File

@@ -0,0 +1,69 @@
upstream php-handler {
server matomo:9000;
}
server {
listen 80;
add_header Referrer-Policy origin; # make sure outgoing links don't show the URL to the Matomo instance
root /var/www/html; # replace with path to your matomo instance
index index.php;
try_files $uri $uri/ =404;
## only allow accessing the following php files
location ~ ^/(index|matomo|piwik|js/index|plugins/HeatmapSessionRecording/configs).php {
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_PROXY ""; # prohibit httpoxy: https://httpoxy.org/
fastcgi_pass php-handler;
}
## deny access to all other .php files
location ~* ^.+\.php$ {
deny all;
return 403;
}
## disable all access to the following directories
location ~ /(config|tmp|core|lang) {
deny all;
return 403; # replace with 404 to not show these directories exist
}
location ~ /\.ht {
deny all;
return 403;
}
location ~ js/container_.*_preview\.js$ {
expires off;
add_header Cache-Control 'private, no-cache, no-store';
}
location ~ \.(gif|ico|jpg|png|svg|js|css|htm|html|mp3|mp4|wav|ogg|avi|ttf|eot|woff|woff2|json)$ {
allow all;
## Cache images,CSS,JS and webfonts for an hour
## Increasing the duration may improve the load-time, but may cause old files to show after an Matomo upgrade
expires 1h;
add_header Pragma public;
add_header Cache-Control "public";
}
location ~ /(libs|vendor|plugins|misc/user) {
deny all;
return 403;
}
## properly display textfiles in root directory
location ~/(.*\.md|LEGALNOTICE|LICENSE) {
default_type text/plain;
}
}
# vim: filetype=nginx

View File

@@ -0,0 +1,40 @@
version: '3'
services:
matomo:
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
volumes:
- "${DATA_PATH}/web:/var/www/html"
environment:
- MATOMO_DATABASE_HOST=${PANEL_DB_HOST}
- MATOMO_DATABASE_ADAPTER=mysql
- MATOMO_DATABASE_TABLES_PREFIX=${PANEL_DB_PREFIX}
- MATOMO_DATABASE_USERNAME=${PANEL_DB_USER}
- MATOMO_DATABASE_PASSWORD=${PANEL_DB_USER_PASSWORD}
- MATOMO_DATABASE_DBNAME=${PANEL_DB_NAME}
- PHP_MEMORY_LIMIT=2048M
image: matomo:fpm-alpine
labels:
createdBy: Apps
matomo-web:
container_name: ${CONTAINER_NAME}-web
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:80"
volumes:
- "${DATA_PATH}/web:/var/www/html:z,ro"
- "./data/matomo.conf:/etc/nginx/conf.d/default.conf:z,ro"
image: nginx:alpine
depends_on:
- matomo
labels:
createdBy: Apps
networks:
1panel-network:
external: true