example docker-compose file:
version: "2"
services:
smsc:
image: rendau/smsc:latest
container_name: smsc
restart: always
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
environment:
TZ: "Asia/Almaty"
CONF_PATH: "/root/conf.json"
LISTEN_ADDRESS: ":80"
5000_BALANCE_NOTIF: "http://url"
1000_BALANCE_NOTIF: "http://url"
expose:
- "80"
volumes:
- "./conf.json:/root/conf.json"
networks:
- loc-net
conf.json must contain credentials for smsc.ru:
{
"username": "username",
"password": "password"
}
Example requests:
POST http://smsc/send
{
"phones": "71112220000,72221110000",
"message": "Some message",
"sync": true
}
POST http://smsc/bcast
{
"phones": "71112220000,72221110000",
"message": "Some message",
"sync": true
}
GET http://smsc/check_balance
Response:
{
value: 3333.33
}
if "sync: true" then sending message will be in synchronized mode
Content type
Image
Digest
Size
7.4 MB
Last updated
almost 7 years ago
docker pull rendau/smsc