Updated port
This commit is contained in:
parent
457fffc692
commit
7940d8af7c
26
Dockerfile
26
Dockerfile
|
@ -12,12 +12,12 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
|
|||
--no-plugins --no-scripts --prefer-dist \
|
||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||
|
||||
FROM php:8.0-rc-cli as step1
|
||||
FROM php:7.4-cli as step1
|
||||
|
||||
ENV TZ=Asia/Tel_Aviv \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PHP_REDIS_VERSION=5.3.0 \
|
||||
PHP_SWOOLE_VERSION=master
|
||||
PHP_SWOOLE_VERSION=4.5.2
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
|
@ -37,12 +37,13 @@ RUN \
|
|||
## Swoole Extension
|
||||
git clone https://github.com/swoole/swoole-src.git && \
|
||||
cd swoole-src && \
|
||||
# git checkout v$PHP_SWOOLE_VERSION && \
|
||||
git checkout v$PHP_SWOOLE_VERSION && \
|
||||
phpize && \
|
||||
./configure --enable-sockets --enable-http2 && \
|
||||
make && make install
|
||||
## Brotli Extension
|
||||
|
||||
FROM php:8.0-rc-cli as final
|
||||
FROM php:7.4-cli as final
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
|
@ -84,18 +85,18 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests webp certbot \
|
||||
libonig-dev libcurl4-gnutls-dev libmagickwand-dev libyaml-dev libz-dev libbrotli-dev
|
||||
#pecl install imagick yaml && \
|
||||
#docker-php-ext-enable imagick yaml
|
||||
libonig-dev libcurl4-gnutls-dev libmagickwand-dev libyaml-dev libbrotli-dev libz-dev && \
|
||||
pecl install imagick yaml && \
|
||||
docker-php-ext-enable imagick yaml
|
||||
|
||||
RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql
|
||||
|
||||
WORKDIR /usr/src/code
|
||||
|
||||
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
|
||||
|
||||
# Add Source Code
|
||||
COPY ./app /usr/src/code/app
|
||||
|
@ -127,7 +128,6 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
|||
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini
|
||||
RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini
|
||||
|
||||
EXPOSE 9501
|
||||
EXPOSE 80
|
||||
|
||||
CMD [ "php" , "app/server.php" ]
|
||||
# docker build -t saw . && docker run -it -p 9501:9501 --rm --name saw-run saw
|
||||
CMD [ "php" , "app/server.php" ]
|
|
@ -12,12 +12,12 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
|
|||
--no-plugins --no-scripts --prefer-dist \
|
||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||
|
||||
FROM php:7.4-cli as step1
|
||||
FROM php:8.0-rc-cli as step1
|
||||
|
||||
ENV TZ=Asia/Tel_Aviv \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PHP_REDIS_VERSION=5.3.0 \
|
||||
PHP_SWOOLE_VERSION=4.5.2
|
||||
PHP_SWOOLE_VERSION=master
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
|
@ -37,13 +37,12 @@ RUN \
|
|||
## Swoole Extension
|
||||
git clone https://github.com/swoole/swoole-src.git && \
|
||||
cd swoole-src && \
|
||||
git checkout v$PHP_SWOOLE_VERSION && \
|
||||
# git checkout v$PHP_SWOOLE_VERSION && \
|
||||
phpize && \
|
||||
./configure --enable-sockets --enable-http2 && \
|
||||
make && make install
|
||||
## Brotli Extension
|
||||
|
||||
FROM php:7.4-cli as final
|
||||
FROM php:8.0-rc-cli as final
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
|
@ -85,18 +84,18 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends --no-install-suggests webp certbot \
|
||||
libonig-dev libcurl4-gnutls-dev libmagickwand-dev libyaml-dev libbrotli-dev libz-dev && \
|
||||
pecl install imagick yaml && \
|
||||
docker-php-ext-enable imagick yaml
|
||||
libonig-dev libcurl4-gnutls-dev libmagickwand-dev libyaml-dev libz-dev libbrotli-dev
|
||||
#pecl install imagick yaml && \
|
||||
#docker-php-ext-enable imagick yaml
|
||||
|
||||
RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql
|
||||
RUN docker-php-ext-install sockets curl opcache pdo pdo_mysql imagick
|
||||
|
||||
WORKDIR /usr/src/code
|
||||
|
||||
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190902/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/
|
||||
COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20190128/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20190128/
|
||||
|
||||
# Add Source Code
|
||||
COPY ./app /usr/src/code/app
|
||||
|
@ -128,8 +127,6 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
|||
RUN echo extension=swoole.so >> /usr/local/etc/php/conf.d/swoole.ini
|
||||
RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini
|
||||
|
||||
EXPOSE 9501
|
||||
EXPOSE 80
|
||||
|
||||
CMD [ "php" , "app/server.php" ]
|
||||
|
||||
# docker build -t saw . && docker run -it -p 9501:9501 --rm --name saw-run saw
|
||||
CMD [ "php" , "app/server.php" ]
|
|
@ -15,7 +15,7 @@ ini_set('display_errors', 1);
|
|||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$http = new Server("localhost", 9501);
|
||||
$http = new Server("localhost", 80);
|
||||
|
||||
$http
|
||||
->set([
|
||||
|
@ -63,6 +63,7 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
|
|||
$app->run($request, $response);
|
||||
} catch (\Throwable $th) {
|
||||
if(App::isDevelopment()) {
|
||||
var_dump(get_class($th));
|
||||
var_dump($th->getMessage());
|
||||
var_dump($th->getFile());
|
||||
var_dump($th->getLine());
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
"appwrite/php-clamav": "1.0.*",
|
||||
|
||||
"utopia-php/framework": "0.7.2",
|
||||
"utopia-php/framework": "0.7.3",
|
||||
"utopia-php/abuse": "0.2.*",
|
||||
"utopia-php/audit": "0.3.*",
|
||||
"utopia-php/cache": "0.2.*",
|
||||
|
|
30
composer.lock
generated
30
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f0c02a1892ad45c2860fab2c6bb41546",
|
||||
"content-hash": "1cafc7f281c675fd1f34afc52bf8ec66",
|
||||
"packages": [
|
||||
{
|
||||
"name": "appwrite/php-clamav",
|
||||
|
@ -392,12 +392,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
|
||||
"reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/e8ed4dbf49b260ff129ff0e0400718c3269971bf",
|
||||
"reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -451,7 +451,7 @@
|
|||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"time": "2020-06-16T21:01:06+00:00"
|
||||
"time": "2020-07-02T06:52:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
|
@ -747,7 +747,7 @@
|
|||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:mustangostang/spyc.git",
|
||||
"url": "https://github.com/mustangostang/spyc.git",
|
||||
"reference": "daf9fa4ef675519386b4f556c9d5ab5f9c14055a"
|
||||
},
|
||||
"dist": {
|
||||
|
@ -1596,16 +1596,16 @@
|
|||
},
|
||||
{
|
||||
"name": "utopia-php/framework",
|
||||
"version": "0.7.2",
|
||||
"version": "0.7.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/framework.git",
|
||||
"reference": "e592b7bdea5eeb48a3bf7ae18bc6d3e622e54cf3"
|
||||
"reference": "3d06964e19f7f8d8cdc5305ee1e52d85a44cfb8b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/e592b7bdea5eeb48a3bf7ae18bc6d3e622e54cf3",
|
||||
"reference": "e592b7bdea5eeb48a3bf7ae18bc6d3e622e54cf3",
|
||||
"url": "https://api.github.com/repos/utopia-php/framework/zipball/3d06964e19f7f8d8cdc5305ee1e52d85a44cfb8b",
|
||||
"reference": "3d06964e19f7f8d8cdc5305ee1e52d85a44cfb8b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1636,7 +1636,7 @@
|
|||
"php",
|
||||
"upf"
|
||||
],
|
||||
"time": "2020-06-30T09:43:41+00:00"
|
||||
"time": "2020-07-02T09:19:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/locale",
|
||||
|
@ -2239,12 +2239,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpspec/prophecy.git",
|
||||
"reference": "451c3cd1418cf640de218914901e51b064abb093"
|
||||
"reference": "69782012a282be8cc263fd56a8b19341b88cc4b4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
|
||||
"reference": "451c3cd1418cf640de218914901e51b064abb093",
|
||||
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/69782012a282be8cc263fd56a8b19341b88cc4b4",
|
||||
"reference": "69782012a282be8cc263fd56a8b19341b88cc4b4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2294,7 +2294,7 @@
|
|||
"spy",
|
||||
"stub"
|
||||
],
|
||||
"time": "2020-03-05T15:02:03+00:00"
|
||||
"time": "2020-07-02T09:43:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
|
|
@ -36,8 +36,8 @@ services:
|
|||
- TESTING=true
|
||||
- VERSION=dev
|
||||
restart: unless-stopped
|
||||
# ports:
|
||||
# - 9501:9501
|
||||
ports:
|
||||
- 9501:80
|
||||
networks:
|
||||
- appwrite
|
||||
labels:
|
||||
|
@ -52,7 +52,7 @@ services:
|
|||
- ./phpunit.xml:/usr/src/code/phpunit.xml
|
||||
- ./tests:/usr/src/code/tests
|
||||
- ./app:/usr/src/code/app
|
||||
# - ./vendor:/usr/src/code/vendor
|
||||
- ./vendor:/usr/src/code/vendor
|
||||
- ./docs:/usr/src/code/docs
|
||||
- ./public:/usr/src/code/public
|
||||
- ./src:/usr/src/code/src
|
||||
|
|
Loading…
Reference in a new issue