{"id":15524258,"url":"https://github.com/leocavalcante/dwoole","last_synced_at":"2025-04-23T07:31:31.129Z","repository":{"id":55616466,"uuid":"171947549","full_name":"leocavalcante/dwoole","owner":"leocavalcante","description":"⚙️ Docker image for Swoole apps with Composer, auto-restart on development and a production-ready version.","archived":false,"fork":false,"pushed_at":"2021-01-01T23:01:10.000Z","size":85,"stargazers_count":32,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T22:41:19.264Z","etag":null,"topics":["development","docker","hot-reload","production","swoole"],"latest_commit_sha":null,"homepage":"https://cloud.docker.com/repository/docker/leocavalcante/dwoole","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leocavalcante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-21T21:23:26.000Z","updated_at":"2022-12-07T02:38:33.000Z","dependencies_parsed_at":"2022-08-15T04:31:34.092Z","dependency_job_id":null,"html_url":"https://github.com/leocavalcante/dwoole","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocavalcante%2Fdwoole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocavalcante%2Fdwoole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocavalcante%2Fdwoole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocavalcante%2Fdwoole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leocavalcante","download_url":"https://codeload.github.com/leocavalcante/dwoole/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250391120,"owners_count":21422846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["development","docker","hot-reload","production","swoole"],"created_at":"2024-10-02T10:50:15.910Z","updated_at":"2025-04-23T07:31:31.106Z","avatar_url":"https://github.com/leocavalcante.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ⚠️ First, I'd like to invite you to take a look at the official Swoole image: https://hub.docker.com/r/phpswoole/swoole\n\n# Dwoole\n\n[Docker](https://www.docker.com/) image for [Swoole](https://www.swoole.co.uk/) apps with [Composer](https://getcomposer.org/), auto-restart on development and a production-ready version.\n\n## Usage\n\n### Requirements\n\n- `composer.json`\n- `index.php` (this will be your entry-point)\n\nEntry-point file can be overridden with the environment variable `ENTRY_POINT_FILE`. See [this](https://github.com/leocavalcante/siler/blob/master/examples/swoole-chat/docker-compose.yml) for an example.\n\n#### Exposed port is 9501\n\n#### Using Docker Compose?\n\nA `docker-compose.yml` file would look like:\n\n```yaml\nversion: \"3\"\nservices:\n  web:\n    container_name: my_app\n    image: leocavalcante/dwoole:dev\n    volumes:\n      - ./:/app\n    ports:\n      - \"9501:9501\"\n```\n\nYeah! Simple like that.\n\n### What is inside?\n\nOptions enabled:\n\n- `--enable-openssl`\n- `--enable-sockets`\n- `--enable-http2`\n- `--enable-mysqlnd`\n\n#### Development\n\nComes bundled with:\n\n- [sdebug](https://github.com/swoole/sdebug)\n- Hot-restart\n- PDO MySQL \u0026 MySQLi\n- MongoDB\n- Redis\n\nWatch interval can be overridden with the environment variable `WATCH_INTERVAL`.\n\n#### Production\n\nComes bundled with:\n\n- _Nothing_\n\nIt is Swoole only. That is because only you knows what your project really needs.\nThe recommended way to use the production variant is as a base image for you project image.\n\n```Dockerfile\nFROM leocavalcante/dwoole:prod\n# Add only what your project really needs\nCOPY . /app\n```\n\nThen you can add whatever extensions you would like.\n\n##### Adding PHP extensions\n\n```Dockerfile\nRUN apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev libzip-dev \\\n \u0026\u0026 docker-php-ext-configure gd \u0026\u0026 docker-php-ext-install -j$(nproc) gd zip\n```\n\n##### Adding PECL extensions\n\n```Dockerfile\nRUN pecl install mongodb \\\n  \u0026\u0026 docker-php-ext-enable mongodb\n```\n\n```Dockerfile\nRUN pecl install redis \\\n  \u0026\u0026 docker-php-ext-enable redis\n```\n\n###### [You can always take a look at the development Dockerfile to see how it installs extensions that you might have used.](https://github.com/leocavalcante/dwoole/blob/master/development/Dockerfile)\n\n#### Why not inotify?\n\n- https://github.com/docker/for-win/issues/56\n- \u003e Linux containers only receive file change events (“inotify events”) if the original files are stored in the Linux filesystem. - https://docs.docker.com/docker-for-windows/wsl/\n\n⚠ Dwoole will always commit to the latest PHP and Swoole versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleocavalcante%2Fdwoole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleocavalcante%2Fdwoole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleocavalcante%2Fdwoole/lists"}