1
0
Fork 0
mirror of synced 2024-05-17 11:12:41 +12:00

Basic structure

This commit is contained in:
Eldad Fux 2020-10-16 10:31:09 +03:00
parent 27983ad2c8
commit 10e39abeae
7 changed files with 177 additions and 92 deletions

View file

@ -146,6 +146,7 @@ RUN mkdir -p /storage/uploads && \
RUN chmod +x /usr/local/bin/doctor && \
chmod +x /usr/local/bin/install && \
chmod +x /usr/local/bin/migrate && \
chmod +x /usr/local/bin/realtime && \
chmod +x /usr/local/bin/schedule && \
chmod +x /usr/local/bin/ssl && \
chmod +x /usr/local/bin/test && \

View file

@ -26,6 +26,7 @@ include __DIR__.'/controllers/general.php';
->paths(realpath(__DIR__ . '/../src'))
->ignore(realpath(__DIR__ . '/../vendor/twig/twig'))
->ignore(realpath(__DIR__ . '/../vendor/guzzlehttp/guzzle'))
->ignore(realpath(__DIR__ . '/../vendor/domnikl'))
->ignore(realpath(__DIR__ . '/../vendor/geoip2'))
->ignore(realpath(__DIR__ . '/../vendor/maxmind'))
->ignore(realpath(__DIR__ . '/../vendor/maxmind-db'))

40
app/realtime.php Normal file
View file

@ -0,0 +1,40 @@
<?php
use Swoole\WebSocket\Server;
use Swoole\Http\Request;
use Swoole\WebSocket\Frame;
/**
* TODO List
*
* - Abuse Control / x mesages per connection
* - CORS Validation
* - Limit payload size
* - Message structure: { status: "ok"|"error", event: EVENT_NAME, data: <any arbitrary data> }
* - JWT Authentication (in path / or in message)
*/
$server = new Server("0.0.0.0", 80);
$server->on("start", function (Server $server) {
echo "Swoole WebSocket Server has started at http://127.0.0.1:3000\n";
});
$server->on('open', function(Server $server, Swoole\Http\Request $request) {
echo "connection open: {$request->fd}\n";
// $server->tick(1000, function() use ($server, $request) {
// $server->push($request->fd, json_encode(["hello", time()]));
// });
$server->push($request->fd, json_encode(["hello", time()]));
});
$server->on('message', function(Server $server, Frame $frame) {
echo "received message: {$frame->data}\n";
$server->push($frame->fd, json_encode(["hello", time()]));
});
$server->on('close', function(Server $server, int $fd) {
echo "connection close: {$fd}\n";
});
$server->start();

3
bin/realtime Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
php /usr/src/code/app/realtime.php $@

View file

@ -53,7 +53,7 @@
"phpmailer/phpmailer": "6.1.7"
},
"require-dev": {
"swoole/ide-helper": "4.5.4",
"swoole/ide-helper": "4.5.5",
"appwrite/sdk-generator": "master",
"phpunit/phpunit": "^9.3"
},

172
composer.lock generated
View file

@ -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": "07a5b2d2e742e8651d58889c3253c3b5",
"content-hash": "a59e355840c9762319629e4cc5fc2dbc",
"packages": [
{
"name": "appwrite/php-clamav",
@ -2300,12 +2300,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "ece0c3ceee73810bd95226401bbfaea9e0f64de7"
"reference": "e33667ac376b7f4dbe97ab556f8e7c8daee383d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ece0c3ceee73810bd95226401bbfaea9e0f64de7",
"reference": "ece0c3ceee73810bd95226401bbfaea9e0f64de7",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e33667ac376b7f4dbe97ab556f8e7c8daee383d3",
"reference": "e33667ac376b7f4dbe97ab556f8e7c8daee383d3",
"shasum": ""
},
"require": {
@ -2365,7 +2365,7 @@
"type": "github"
}
],
"time": "2020-10-09T14:34:55+00:00"
"time": "2020-10-15T05:14:52+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -2373,12 +2373,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
"reference": "8a1b0bfa74eba894f241e23261febb84c7ffbd8d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
"reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/8a1b0bfa74eba894f241e23261febb84c7ffbd8d",
"reference": "8a1b0bfa74eba894f241e23261febb84c7ffbd8d",
"shasum": ""
},
"require": {
@ -2421,7 +2421,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:57:25+00:00"
"time": "2020-10-15T05:05:12+00:00"
},
{
"name": "phpunit/php-invoker",
@ -2429,12 +2429,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
"reference": "dcc4b2e39d6cb5ba5435a0177ebe947c0c0d05ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/dcc4b2e39d6cb5ba5435a0177ebe947c0c0d05ff",
"reference": "dcc4b2e39d6cb5ba5435a0177ebe947c0c0d05ff",
"shasum": ""
},
"require": {
@ -2480,7 +2480,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:58:55+00:00"
"time": "2020-10-15T05:05:21+00:00"
},
{
"name": "phpunit/php-text-template",
@ -2488,12 +2488,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "18c887016e60e52477e54534956d7b47bc52cd84"
"reference": "0b11f04dcd54d149c3904cda577ea8ef8735e377"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/18c887016e60e52477e54534956d7b47bc52cd84",
"reference": "18c887016e60e52477e54534956d7b47bc52cd84",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0b11f04dcd54d149c3904cda577ea8ef8735e377",
"reference": "0b11f04dcd54d149c3904cda577ea8ef8735e377",
"shasum": ""
},
"require": {
@ -2535,7 +2535,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:03:05+00:00"
"time": "2020-10-15T05:06:00+00:00"
},
{
"name": "phpunit/php-timer",
@ -2543,12 +2543,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7"
"reference": "7fe57355ba7462b1cd940d93aa003660b4e6db20"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9ff14f493699e2f6adee9fd06a0245b276643b7",
"reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/7fe57355ba7462b1cd940d93aa003660b4e6db20",
"reference": "7fe57355ba7462b1cd940d93aa003660b4e6db20",
"shasum": ""
},
"require": {
@ -2590,7 +2590,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:00:25+00:00"
"time": "2020-10-15T05:05:31+00:00"
},
{
"name": "phpunit/phpunit",
@ -2598,12 +2598,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "8b79c2a70ae855e582cef1ca63a849fe07bdb01d"
"reference": "137f98be3b928d5f9f14e66f7aa5eadcfc668bbe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8b79c2a70ae855e582cef1ca63a849fe07bdb01d",
"reference": "8b79c2a70ae855e582cef1ca63a849fe07bdb01d",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/137f98be3b928d5f9f14e66f7aa5eadcfc668bbe",
"reference": "137f98be3b928d5f9f14e66f7aa5eadcfc668bbe",
"shasum": ""
},
"require": {
@ -2689,7 +2689,7 @@
"type": "github"
}
],
"time": "2020-10-11T07:43:20+00:00"
"time": "2020-10-15T05:02:48+00:00"
},
{
"name": "sebastian/cli-parser",
@ -2697,12 +2697,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
"reference": "bb13fcea306b784ef38fc1cda21c1395c233f4bc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/bb13fcea306b784ef38fc1cda21c1395c233f4bc",
"reference": "bb13fcea306b784ef38fc1cda21c1395c233f4bc",
"shasum": ""
},
"require": {
@ -2741,7 +2741,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:08:49+00:00"
"time": "2020-10-15T05:19:54+00:00"
},
{
"name": "sebastian/code-unit",
@ -2749,12 +2749,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
"reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab"
"reference": "46a6ff3fabc0449fa17ca3ec485c44ab792f65c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
"reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/46a6ff3fabc0449fa17ca3ec485c44ab792f65c1",
"reference": "46a6ff3fabc0449fa17ca3ec485c44ab792f65c1",
"shasum": ""
},
"require": {
@ -2793,7 +2793,7 @@
"type": "github"
}
],
"time": "2020-10-02T14:47:54+00:00"
"time": "2020-10-15T05:03:44+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@ -2801,12 +2801,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
"reference": "a801a24d7681090e8334c631b99181df063ea457"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/a801a24d7681090e8334c631b99181df063ea457",
"reference": "a801a24d7681090e8334c631b99181df063ea457",
"shasum": ""
},
"require": {
@ -2844,7 +2844,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:30:19+00:00"
"time": "2020-10-15T05:03:53+00:00"
},
{
"name": "sebastian/comparator",
@ -2852,12 +2852,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "7a8ff306445707539c1a6397372a982a1ec55120"
"reference": "d43148f588efca5b5dd0c3d98da467f5aafdac6b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7a8ff306445707539c1a6397372a982a1ec55120",
"reference": "7a8ff306445707539c1a6397372a982a1ec55120",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d43148f588efca5b5dd0c3d98da467f5aafdac6b",
"reference": "d43148f588efca5b5dd0c3d98da467f5aafdac6b",
"shasum": ""
},
"require": {
@ -2914,7 +2914,7 @@
"type": "github"
}
],
"time": "2020-09-30T06:47:25+00:00"
"time": "2020-10-15T05:04:03+00:00"
},
{
"name": "sebastian/complexity",
@ -2922,12 +2922,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff"
"reference": "6d4cf3e8224f1e8527ab434b4ba902978af523db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
"reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/6d4cf3e8224f1e8527ab434b4ba902978af523db",
"reference": "6d4cf3e8224f1e8527ab434b4ba902978af523db",
"shasum": ""
},
"require": {
@ -2967,7 +2967,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:05:03+00:00"
"time": "2020-10-15T05:06:11+00:00"
},
{
"name": "sebastian/diff",
@ -2975,12 +2975,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "e3ec6059b3fe483d42fbaf1fe6eefa201f7b4a6d"
"reference": "c25d82b5b776a3ba4e3b232a8688e969477444e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e3ec6059b3fe483d42fbaf1fe6eefa201f7b4a6d",
"reference": "e3ec6059b3fe483d42fbaf1fe6eefa201f7b4a6d",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c25d82b5b776a3ba4e3b232a8688e969477444e0",
"reference": "c25d82b5b776a3ba4e3b232a8688e969477444e0",
"shasum": ""
},
"require": {
@ -3029,7 +3029,7 @@
"type": "github"
}
],
"time": "2020-10-13T11:48:30+00:00"
"time": "2020-10-15T05:04:12+00:00"
},
{
"name": "sebastian/environment",
@ -3037,12 +3037,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
"reference": "40fcf803a36737ce1d2c46c489fb5d1ec2db45d4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/40fcf803a36737ce1d2c46c489fb5d1ec2db45d4",
"reference": "40fcf803a36737ce1d2c46c489fb5d1ec2db45d4",
"shasum": ""
},
"require": {
@ -3088,7 +3088,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:52:38+00:00"
"time": "2020-10-15T05:04:22+00:00"
},
{
"name": "sebastian/exporter",
@ -3096,12 +3096,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
"reference": "dbdc89af25883b35be6ddd4b88a8bc5d22bb819d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/dbdc89af25883b35be6ddd4b88a8bc5d22bb819d",
"reference": "dbdc89af25883b35be6ddd4b88a8bc5d22bb819d",
"shasum": ""
},
"require": {
@ -3161,7 +3161,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:24:23+00:00"
"time": "2020-10-15T05:04:32+00:00"
},
{
"name": "sebastian/global-state",
@ -3169,12 +3169,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7"
"reference": "3a606041b47fb201c1d62ae03078d0e8a62569a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ea779cb749a478b22a2564ac41cd7bda79c78dc7",
"reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3a606041b47fb201c1d62ae03078d0e8a62569a6",
"reference": "3a606041b47fb201c1d62ae03078d0e8a62569a6",
"shasum": ""
},
"require": {
@ -3221,7 +3221,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:54:06+00:00"
"time": "2020-10-15T05:04:42+00:00"
},
{
"name": "sebastian/lines-of-code",
@ -3229,12 +3229,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54"
"reference": "5835b6f4707e022ae53a2a67420a3388b318715a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/6514b8f21906b8b46f520d1fbd17a4523fa59a54",
"reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/5835b6f4707e022ae53a2a67420a3388b318715a",
"reference": "5835b6f4707e022ae53a2a67420a3388b318715a",
"shasum": ""
},
"require": {
@ -3274,7 +3274,7 @@
"type": "github"
}
],
"time": "2020-09-28T06:07:27+00:00"
"time": "2020-10-15T05:06:21+00:00"
},
{
"name": "sebastian/object-enumerator",
@ -3282,12 +3282,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "f6f5957013d84725427d361507e13513702888a4"
"reference": "192362c78b33b0231e1e8841678be93ce6f31830"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f6f5957013d84725427d361507e13513702888a4",
"reference": "f6f5957013d84725427d361507e13513702888a4",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/192362c78b33b0231e1e8841678be93ce6f31830",
"reference": "192362c78b33b0231e1e8841678be93ce6f31830",
"shasum": ""
},
"require": {
@ -3327,7 +3327,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:55:06+00:00"
"time": "2020-10-15T05:04:51+00:00"
},
{
"name": "sebastian/object-reflector",
@ -3335,12 +3335,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5"
"reference": "da3d1ade6fef132f2486d297c35cf61e45930a0b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5",
"reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/da3d1ade6fef132f2486d297c35cf61e45930a0b",
"reference": "da3d1ade6fef132f2486d297c35cf61e45930a0b",
"shasum": ""
},
"require": {
@ -3378,7 +3378,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:56:16+00:00"
"time": "2020-10-15T05:05:01+00:00"
},
{
"name": "sebastian/recursion-context",
@ -3386,12 +3386,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "7e70f3d32a3058d4ad5226c1371f2dd4677dc073"
"reference": "3767a68ada0fc1d50b22db067cd2256b1b722faa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/7e70f3d32a3058d4ad5226c1371f2dd4677dc073",
"reference": "7e70f3d32a3058d4ad5226c1371f2dd4677dc073",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3767a68ada0fc1d50b22db067cd2256b1b722faa",
"reference": "3767a68ada0fc1d50b22db067cd2256b1b722faa",
"shasum": ""
},
"require": {
@ -3437,7 +3437,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:27:00+00:00"
"time": "2020-10-15T05:05:41+00:00"
},
{
"name": "sebastian/resource-operations",
@ -3496,12 +3496,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909"
"reference": "5eb6a85e349cab8a411886cb52c070393d71bc7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fa592377f3923946cb90bf1f6a71ba2e5f229909",
"reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/5eb6a85e349cab8a411886cb52c070393d71bc7e",
"reference": "5eb6a85e349cab8a411886cb52c070393d71bc7e",
"shasum": ""
},
"require": {
@ -3540,7 +3540,7 @@
"type": "github"
}
],
"time": "2020-10-06T08:41:03+00:00"
"time": "2020-10-15T05:05:50+00:00"
},
{
"name": "sebastian/version",
@ -3593,16 +3593,16 @@
},
{
"name": "swoole/ide-helper",
"version": "4.5.4",
"version": "4.5.5",
"source": {
"type": "git",
"url": "https://github.com/swoole/ide-helper.git",
"reference": "3382a1844afb206cac064252f6b8b50115bf72bb"
"reference": "aefd9d15e00cf14b89a5ed87cfa3bd79c9889028"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swoole/ide-helper/zipball/3382a1844afb206cac064252f6b8b50115bf72bb",
"reference": "3382a1844afb206cac064252f6b8b50115bf72bb",
"url": "https://api.github.com/repos/swoole/ide-helper/zipball/aefd9d15e00cf14b89a5ed87cfa3bd79c9889028",
"reference": "aefd9d15e00cf14b89a5ed87cfa3bd79c9889028",
"shasum": ""
},
"require-dev": {
@ -3623,7 +3623,7 @@
}
],
"description": "IDE help files for Swoole.",
"time": "2020-09-16T00:12:52+00:00"
"time": "2020-10-14T18:05:12+00:00"
},
{
"name": "symfony/polyfill-ctype",

View file

@ -10,8 +10,8 @@ services:
- --providers.file.directory=/storage/config
- --providers.file.watch=true
- --providers.docker=true
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --entrypoints.appwrite_web.address=:80
- --entrypoints.appwrite_websecure.address=:443
- --accesslog=true
restart: unless-stopped
ports:
@ -41,9 +41,18 @@ services:
networks:
- appwrite
labels:
- traefik.http.routers.appwrite.rule=PathPrefix(`/`)
- traefik.http.routers.appwrite-secure.rule=PathPrefix(`/`)
- traefik.http.routers.appwrite-secure.tls=true
- "traefik.enable=true"
- "traefik.docker.network=appwrite"
- "traefik.http.services.appwrite_api.loadbalancer.server.port=80"
#http
- traefik.http.routers.appwrite_api_http.entrypoints=appwrite_web
- traefik.http.routers.appwrite_api_http.rule=PathPrefix(`/`)
- traefik.http.routers.appwrite_api_http.service=appwrite_api
# https
- traefik.http.routers.appwrite_api_https.entrypoints=appwrite_websecure
- traefik.http.routers.appwrite_api_https.rule=PathPrefix(`/`)
- traefik.http.routers.appwrite_api_https.service=appwrite_api
- traefik.http.routers.appwrite_api_https.tls=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- appwrite-uploads:/storage/uploads:rw
@ -87,6 +96,37 @@ services:
- _APP_FUNCTIONS_TIMEOUT
- _APP_FUNCTIONS_CONTAINERS
appwrite-socket:
entrypoint: socket
container_name: appwrite-socket
build:
context: .
restart: unless-stopped
ports:
- 9502:80
labels:
- "traefik.enable=true"
- "traefik.docker.network=appwrite"
- "traefik.http.services.appwrite_socket.loadbalancer.server.port=80"
#ws
- traefik.http.routers.appwrite_socket_ws.entrypoints=appwrite_web
- traefik.http.routers.appwrite_socket_ws.rule=PathPrefix(`/v1/realtime`)
- traefik.http.routers.appwrite_socket_ws.service=appwrite_socket
# wss
- traefik.http.routers.appwrite_socket_wss.entrypoints=appwrite_websecure
- traefik.http.routers.appwrite_socket_wss.rule=PathPrefix(`/v1/realtime`)
- traefik.http.routers.appwrite_socket_wss.service=appwrite_socket
- traefik.http.routers.appwrite_socket_wss.tls=true
- traefik.http.routers.appwrite_socket_wss.tls.certresolver=dns
networks:
- appwrite
depends_on:
- redis
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT
appwrite-worker-usage:
entrypoint: worker-usage
container_name: appwrite-worker-usage