Skip to content

Commit

Permalink
Update amp (#5170)
Browse files Browse the repository at this point in the history
* Update amp

* Update connection limit

* Add socket bind context
Bigger backlog, reuseport and tcpnodelay
  • Loading branch information
joanhey authored and NateBrady23 committed Oct 23, 2019
1 parent b4064c3 commit 0d05af1
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 1,804 deletions.
10 changes: 5 additions & 5 deletions frameworks/PHP/amp/amp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update -yqq > /dev/null && \
apt-get install -yqq git unzip php7.2 php7.2-common php7.2-cli php7.2-dev php7.2-mbstring composer curl build-essential > /dev/null
apt-get install -yqq git unzip php7.3 php7.3-common php7.3-cli php7.3-dev php7.3-mbstring composer curl build-essential > /dev/null

# An extension is required!
# We deal with concurrencies over 1k, which stream_select doesn't support.

ADD ./install-ev.sh /install-ev.sh
RUN /install-ev.sh > /dev/null
RUN apt-get install -y php-pear php-dev libuv1-dev libuv1 > /dev/null
RUN pecl install uv-0.2.4 > /dev/null

ADD ./ /amp
WORKDIR /amp

COPY deploy/conf/* /etc/php/7.2/cli/conf.d/
COPY deploy/conf/* /etc/php/7.3/cli/conf.d/

RUN composer install --optimize-autoloader --classmap-authoritative --no-dev --quiet

CMD php /amp/vendor/bin/cluster -s /amp/server.php
CMD php /amp/vendor/bin/cluster /amp/server.php
6 changes: 3 additions & 3 deletions frameworks/PHP/amp/composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"require": {
"amphp/cluster": "dev-master#8ba0a45aea1ac86b368254f0868ca3568744b679",
"amphp/http-server": "^0.8.2",
"amphp/cluster": "^1",
"amphp/http-server": "^2.0.0-rc2",
"amphp/http-server-router": "^1",
"amphp/mysql": "^0.3"
"amphp/mysql": "dev-master#59086f7acc3151eea92e062ece6f21516aff28a5"
}
}
Loading

0 comments on commit 0d05af1

Please sign in to comment.