xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
529 stars 116 forks source link

Starting multiple sessions with docker compose? #117

Closed Surzhikov closed 1 year ago

Surzhikov commented 1 year ago

Hi. How to start multiple telegram sessions with docker compose (without changing your original docker-compose.yml file from -s=session to -s=session1 -s=session2 -s=session3 in command section) ?

We can use docker compose run --detach telegram-api-server --session=session1 --session=session2 --session=session4, but I think it`s a bad idea.

May be it will be better, to add ENV param "SESSIONS" with comma-separated value?

xtrime-ru commented 1 year ago

By default, Compose reads two files, a docker-compose.yml and an optional docker-compose.override.yml file. By convention, the docker-compose.yml contains your base configuration. The override file, as its name implies, can contain configuration overrides for existing services or entirely new services.

https://docs.docker.com/compose/extends/#multiple-compose-files