mirror of
https://github.com/easychen/pushdeer.git
synced 2025-02-22 16:04:56 +08:00
更新推送ready的配置,为自架客户端做准备
This commit is contained in:
parent
5467106425
commit
f257830b49
@ -206,16 +206,13 @@ PushDeer主要面向以下三类用户
|
||||
|
||||
```git clone https://github.com/easychen/pushdeer.git```
|
||||
|
||||
### 配置推送证书
|
||||
|
||||
进入 `push` 目录,修改 `*.yml.sample` 为 `*.yml`。其中iOS应用和Clip使用两个分开的证书进行推送,`ios.yml` 是APP的配置、`clip.yml`是Clip的配置。注意根据开发和产品状态,修改`yml`中的值`production`。
|
||||
|
||||
默认配置中,`c.p12` 是APP的推送证书、`cc.p12`是Clip的推送证书。
|
||||
|
||||
### 启动docker环境
|
||||
|
||||
运行 `docker-compose up -d`,启动API。默认访问地址为`http://127.0.0.1:8800`。可修改`docker-compose.yml`调整端口。
|
||||
|
||||
> 亦可运行 `docker-compose -f docker-compose.self-hosted.yml up --build -d` 启动已配置推送功能的版本
|
||||
|
||||
### API 说明
|
||||
|
||||
[在线文档(Swagger)](https://ilovintit.github.io/pushdeer-api-doc/#/)
|
||||
|
@ -44,6 +44,8 @@ services:
|
||||
- DB_TIMEZONE=+08:00
|
||||
- DB_USERNAME=pushdeer
|
||||
- APP_DEBUG=false
|
||||
- GO_PUSH_IOS_TOPIC=com.pushdeer.self.ios
|
||||
- GO_PUSH_IOS_CLIP_TOPIC=com.pushdeer.self.ios.Clip
|
||||
```
|
||||
|
||||
### STEP2:配置 SSL 证书
|
||||
@ -80,6 +82,10 @@ services:
|
||||
|
||||
#### iOS 推送
|
||||
|
||||
可直接使用`PushDeer·自架版`客户端。
|
||||
|
||||
如自行编译客户端,需生成APP和Clip的推送证书,并按以下方式配置:
|
||||
|
||||
进入 push 目录,修改 `*.yml.sample` 为 `*.yml`。其中iOS应用和Clip使用两个分开的证书进行推送,`ios.yml` 是APP的配置、`clip.yml` 是Clip的配置。注意根据开发和产品状态,修改`yml`中的值`production`。
|
||||
|
||||
默认配置中,`c.p12` 是APP的推送证书、`cc.p12`是Clip的推送证书。
|
||||
|
35
docker-compose.self-hosted.yml
Normal file
35
docker-compose.self-hosted.yml
Normal file
@ -0,0 +1,35 @@
|
||||
version: '2'
|
||||
services:
|
||||
mariadb:
|
||||
image: 'mariadb:10.5.8-focal'
|
||||
volumes:
|
||||
- 'mariadb_data:/var/lib/mysql'
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=theVeryp@ssw0rd
|
||||
- MYSQL_DATABASE=pushdeer
|
||||
ports:
|
||||
- '3306:3306'
|
||||
redis:
|
||||
image: 'bitnami/redis:6.0.16'
|
||||
environment:
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
app:
|
||||
#image: 'webdevops/php-apache:8.0-alpine'
|
||||
build: './docker/web/'
|
||||
ports:
|
||||
- '8800:80'
|
||||
volumes:
|
||||
- './:/app'
|
||||
depends_on:
|
||||
- mariadb
|
||||
- redis
|
||||
environment:
|
||||
- DB_HOST=mariadb
|
||||
- DB_PORT=3306
|
||||
- DB_USERNAME=root
|
||||
- DB_DATABASE=pushdeer
|
||||
- DB_PASSWORD=theVeryp@ssw0rd
|
||||
- GO_PUSH_IOS_TOPIC=com.pushdeer.self.ios
|
||||
- GO_PUSH_IOS_CLIP_TOPIC=com.pushdeer.self.ios.Clip
|
||||
volumes:
|
||||
mariadb_data:
|
3
push/.gitignore
vendored
3
push/.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
*.yml
|
||||
*.p12
|
||||
*.p8
|
BIN
push/c.p12
Normal file
BIN
push/c.p12
Normal file
Binary file not shown.
BIN
push/cc.p12
Normal file
BIN
push/cc.p12
Normal file
Binary file not shown.
48
push/clip.yml
Executable file
48
push/clip.yml
Executable file
@ -0,0 +1,48 @@
|
||||
core:
|
||||
enabled: true # enable httpd server
|
||||
address: "127.0.0.1" # ip address to bind (default: any)
|
||||
shutdown_timeout: 30 # default is 30 second
|
||||
port: "8889" # ignore this port number if auto_tls is enabled (listen 443).
|
||||
sync: false
|
||||
max_notification: 1
|
||||
cert_path: "cc.p12"
|
||||
key_path: ""
|
||||
cert_base64: ""
|
||||
key_base64: ""
|
||||
http_proxy: ""
|
||||
pid:
|
||||
enabled: false
|
||||
path: "gorush.pid"
|
||||
override: true
|
||||
|
||||
api:
|
||||
push_uri: "/api/push"
|
||||
stat_go_uri: "/api/stat/go"
|
||||
stat_app_uri: "/api/stat/app"
|
||||
config_uri: "/api/config"
|
||||
sys_stat_uri: "/sys/stats"
|
||||
metric_uri: "/metrics"
|
||||
health_uri: "/healthz"
|
||||
|
||||
ios:
|
||||
enabled: true
|
||||
key_path: "cc.p12"
|
||||
key_base64: "" # load iOS key from base64 input
|
||||
key_type: "p12" # could be pem, p12 or p8 type
|
||||
password: "64wtMhU4mULj" # certificate password, default as empty string.
|
||||
production: false
|
||||
max_concurrent_pushes: 100 # just for push ios notification
|
||||
max_retry: 0 # resend fail notification, default value zero is disabled
|
||||
key_id: "66M7BD2GCV" # KeyID from developer account (Certificates, Identifiers & Profiles -> Keys)
|
||||
team_id: "HUJ6HAE4VU" # TeamID from developer account (View Account -> Membership)
|
||||
|
||||
log:
|
||||
format: "string" # string or json
|
||||
access_log: "stdout" # stdout: output to console, or define log path like "log/access_log"
|
||||
access_level: "debug"
|
||||
error_log: "stderr" # stderr: output to console, or define log path like "log/error_log"
|
||||
error_level: "error"
|
||||
hide_token: true
|
||||
|
||||
stat:
|
||||
engine: "memory" # support memory, redis, boltdb, buntdb or leveldb
|
48
push/ios.yml
Executable file
48
push/ios.yml
Executable file
@ -0,0 +1,48 @@
|
||||
core:
|
||||
enabled: true # enable httpd server
|
||||
address: "127.0.0.1" # ip address to bind (default: any)
|
||||
shutdown_timeout: 30 # default is 30 second
|
||||
port: "8888" # ignore this port number if auto_tls is enabled (listen 443).
|
||||
sync: false
|
||||
max_notification: 1
|
||||
cert_path: "c.p12"
|
||||
key_path: ""
|
||||
cert_base64: ""
|
||||
key_base64: ""
|
||||
http_proxy: ""
|
||||
pid:
|
||||
enabled: false
|
||||
path: "gorush.pid"
|
||||
override: true
|
||||
|
||||
api:
|
||||
push_uri: "/api/push"
|
||||
stat_go_uri: "/api/stat/go"
|
||||
stat_app_uri: "/api/stat/app"
|
||||
config_uri: "/api/config"
|
||||
sys_stat_uri: "/sys/stats"
|
||||
metric_uri: "/metrics"
|
||||
health_uri: "/healthz"
|
||||
|
||||
ios:
|
||||
enabled: true
|
||||
key_path: "c.p12"
|
||||
key_base64: "" # load iOS key from base64 input
|
||||
key_type: "p12" # could be pem, p12 or p8 type
|
||||
password: "64wtMhU4mULj" # certificate password, default as empty string.
|
||||
production: false
|
||||
max_concurrent_pushes: 100 # just for push ios notification
|
||||
max_retry: 0 # resend fail notification, default value zero is disabled
|
||||
key_id: "66M7BD2GCV" # KeyID from developer account (Certificates, Identifiers & Profiles -> Keys)
|
||||
team_id: "HUJ6HAE4VU" # TeamID from developer account (View Account -> Membership)
|
||||
|
||||
log:
|
||||
format: "string" # string or json
|
||||
access_log: "stdout" # stdout: output to console, or define log path like "log/access_log"
|
||||
access_level: "debug"
|
||||
error_log: "stderr" # stderr: output to console, or define log path like "log/error_log"
|
||||
error_level: "error"
|
||||
hide_token: true
|
||||
|
||||
stat:
|
||||
engine: "memory" # support memory, redis, boltdb, buntdb or leveldb
|
Loading…
x
Reference in New Issue
Block a user