mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 20:04:45 +01:00
Update Dockerfile
This commit is contained in:
parent
a04797b173
commit
3ad25a7206
16
Dockerfile
16
Dockerfile
@ -3,14 +3,18 @@ FROM php:7.4-cli
|
|||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN pecl install apcu ev \
|
RUN apt-get update && apt-get upgrade -y \
|
||||||
&& docker-php-ext-enable apcu ev \
|
&& apt-get install apt-utils -y \
|
||||||
&& apt-get update && apt-get upgrade -y \
|
&& apt-get install git zip vim nano wget libzip-dev libgmp-dev libevent-dev libssl-dev libnghttp2-dev libffi-dev -y \
|
||||||
&& apt-get install git zip vim nano -y \
|
&& docker-php-ext-install sockets zip gmp pcntl bcmath ffi \
|
||||||
&& apt-get autoremove -y \
|
&& PHP_OPENSSL=yes pecl install apcu ev event \
|
||||||
|
&& docker-php-ext-enable apcu ev event \
|
||||||
|
&& docker-php-source delete \
|
||||||
|
&& apt-get autoremove --purge -y && apt-get autoclean -y && apt-get clean -y \
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
&& composer global require hirak/prestissimo \
|
&& composer global require hirak/prestissimo \
|
||||||
&& composer install -o --no-dev
|
&& composer install -o --no-dev \
|
||||||
|
&& composer clear
|
||||||
|
|
||||||
VOLUME ["/app/sessions"]
|
VOLUME ["/app/sessions"]
|
||||||
|
|
||||||
|
@ -142,6 +142,7 @@ class Client
|
|||||||
function() use ($sessionName) {
|
function() use ($sessionName) {
|
||||||
if (static::isSessionLoggedIn($this->instances[$sessionName])) {
|
if (static::isSessionLoggedIn($this->instances[$sessionName])) {
|
||||||
yield $this->instances[$sessionName]->start();
|
yield $this->instances[$sessionName]->start();
|
||||||
|
$this->instances[$sessionName]->unsetEventHandler();
|
||||||
Loop::defer(function() use($sessionName) {
|
Loop::defer(function() use($sessionName) {
|
||||||
while (!empty($this->instances[$sessionName]) && static::isSessionLoggedIn($this->instances[$sessionName])) {
|
while (!empty($this->instances[$sessionName]) && static::isSessionLoggedIn($this->instances[$sessionName])) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user