appleboy / appleboy/gorush

Multiple configurations with one docker instance

Open
#739 0 comments 3 reactions 0 assignees View on GitHub
Feature
Dominant language
Go
Stars
8.8k
Forks
887
PR merge metrics
No merged PRs in 30d

Description

I am a user of Gorush and think it is a fantastic tool for sending push notifications.

Currently, Gorush uses a single configuration file for all push requests. This means that if we want to use different configurations for different push messages, we need to run multiple Gorush instances on our server.

It would be pretty cool if we could select a configuration file when we call `api/push`:

```
{
"config": "my_config.yml",
"notifications": [
{
"tokens": [ "token_a", "token_b"],
"platform": 1,
"message": "Hello World iOS!"
}
]
}
```

Maybe the function already exists, but today I had massive difficulties to include my own configuration in my Docker instance, because the documentation does not describe that the `config.yml` has to be located under `/home/gorush/config.yml`.

Maybe the function already exists, but today I had massive difficulties to include my own configuration into my Docker instance, because the documentation does not describe that the `config.yml` has to be located under `/home/gorush/config.yml`.

In the meantime it works at least once with a single configuration:

```
gorush:
environment:
- GORUSH_CONFIG=/config.yml
container_name: my_gorush
image: appleboy/gorush:latest
restart: always
hostname: my-gorush
networks:
my-network:
volumes:
- ./data/gorush/config.yml:/home/gorush/config.yml
- ./data/log/gorush:/var/log
- ./data/certificates:/certificates:ro
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the api/push entry point and review how Gorush currently loads its single configuration. Compare the proposed per-request config value with the Docker setup and GORUSH_CONFIG example in the issue. Done means the requested configuration can be selected for a push request, while the Docker configuration path is documented clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
api, backend, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.