appleboy / gorush

A push notification server written in Go (Golang).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple configurations with one docker instance

jonathan8devs opened this issue · comments

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