gorush
gorush copied to clipboard
Gorush does not take configuration from environment variables
Hello, Gorush doesn’t read the values of the variables GORUSH_QUEUE_REDIS_USERNAME, GORUSH_QUEUE_REDIS_PASSWORD, and GORUSH_STAT_REDIS_USERNAME.
Step for reproduce
- Run container
docker run -d \
-p 8088:8088 \
--name gorush \
-v $(pwd):/opt/ \
-e GORUSH_CORE_WORKER_NUM=1 \
-e GORUSH_ANDROID_ENABLED=true \
-e GORUSH_ANDROID_KEY_PATH=/opt/credential.json \
-e GORUSH_QUEUE_ENGINE=redis \
-e GORUSH_QUEUE_REDIS_ADDR=redis-gorush:6379 \
-e GORUSH_QUEUE_REDIS_USERNAME="default" \
-e GORUSH_QUEUE_REDIS_PASSWORD="XXXXXXX" \
-e GORUSH_LOG_FORMAT=json \
-e GORUSH_STAT_ENGINE=redis \
-e GORUSH_STAT_REDIS_ADDR="redis-gorush:6379" \
-e GORUSH_STAT_REDIS_USERNAME="default" \
-e GORUSH_STAT_REDIS_PASSWORD="XXXXXXXXXX" \
-e GORUSH_STAT_REDIS_DB=1 \
appleboy/gorush:1.18.4
- Check runtime config
curl http://localhost:8088/api/config
core:
enabled: true
address: ""
shutdown_timeout: 30
port: "8088"
max_notification: 100
worker_num: 1
queue_num: 8192
mode: release
sync: false
ssl: false
cert_path: cert.pem
key_path: key.pem
cert_base64: ""
key_base64: ""
http_proxy: ""
pid:
enabled: false
path: gorush.pid
override: true
auto_tls:
enabled: false
folder: .cache
host: ""
feedback_hook_url: ""
feedback_timeout: 10
feedback_header: []
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
android:
enabled: true
key_path: /opt/credential.json
credential: ""
max_retry: 0
huawei:
enabled: false
appsecret: YOUR_APP_SECRET
appid: YOUR_APP_ID
max_retry: 0
ios:
enabled: false
key_path: ""
key_base64: ""
key_type: pem
password: ""
production: false
max_concurrent_pushes: 100
max_retry: 0
key_id: ""
team_id: ""
queue:
engine: redis
nsq:
addr: 127.0.0.1:4150
topic: gorush
channel: gorush
nats:
addr: 127.0.0.1:4222
subj: gorush
queue: gorush
redis:
addr: redis-gorush:6379
stream_name: gorush
group: gorush
consumer: gorush
log:
format: json
access_log: stdout
access_level: debug
error_log: stderr
error_level: error
hide_token: true
hide_messages: false
stat:
engine: redis
redis:
cluster: false
addr: redis-gorush:6379
password: XXXXXXXX
db: 1
boltdb:
path: bolt.db
bucket: gorush
buntdb:
path: bunt.db
leveldb:
path: level.db
badgerdb:
path: badger.db
grpc:
enabled: false
port: "9000"
I don't see parameters username and password so gorush doesn't connect to redis
I will take it.