Skip to content
⚙️ Docker image for Swoole apps with Composer, auto-restart on development and a production-ready version.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
1.0
example
.editorconfig
LICENSE
README.md
build.ps1

README.md

Dwoole

Docker image for Swoole apps with Composer, auto-restart on development and a production-ready version.

Usage

Requirements

  • composer.json
  • index.php (this will be your entry-point)

Entry-point file can be overridden with the environment variable ENTRY_POINT_FILE. See this for an example.

Exposed port is 9501

Using Docker Compose?

A docker-compose.yml file would look like:

version: "3"
services:
  web:
    container_name: my_app
    image: leocavalcante/dwoole:1.0-development
    volumes:
      - ./:/app
    ports:
      - "9501:9501"

Yeah! Simple like that.

Development

Comes bundled with:

  • Hot-restart
  • PDO (MySQL)
  • MongoDB
  • Redis

And all Swoole options enabled:

  • --enable-openssl
  • --enable-sockets
  • --enable-http2
  • --enable-mysqlnd
  • --enable-async-redis

Production

Comes bundled with:

  • Nothing

It is Swoole only. That is because only you knows what your project really needs. The recommended way to use the production variant is as a base image for you project image.

FROM leocavalcante/dwoole:<version>-production

Then you can add whatever extensions you would like.

Adding PECL extensions

TODO

Why not inotify?

https://github.com/docker/for-win/issues/56

You can’t perform that action at this time.