项目作者: deminy

项目描述 :
Learn Swoole by Examples
高级语言: Dockerfile
项目地址: git://github.com/deminy/swoole-by-examples.git
创建时间: 2019-02-14T06:05:00Z
项目社区:https://github.com/deminy/swoole-by-examples

开源协议:Other

下载


Swoole by Examples

License: CC BY-NC-ND 4.0

The repository is to help developers to get familiar with Swoole through a
variety of examples. All the examples are fully functioning; they can be executed and verified using the Docker images
provided.

NOTE: I’m adding examples for latest versions of Swoole, so please be patient.

Setup the Development Environment

We use Docker to setup our development environment. Other than Docker, you don’t need to install any other software to
run and test the examples: you don’t need to have PHP, Swoole, Composer, or some other software installed locally.

We use the official Docker image of Swoole to run the examples. There are
tens of examples under repository swoole/docker-swoole shown how to use the
image. Please spend some time checking it first.

Before running the examples, please run command docker-compose up -d under the root repository directory to start the
Docker containers. There are two containers used to run the examples:

  • a server container where application servers are running.
  • a client container where client-side scripts should be executed.

Both containers have the same PHP scripts in place, so most standalone scripts (e.g., most CSP programming examples) can be
executed from either container. Once the containers are running, you can use one of following commands to get a Bash shell
in the containers:

  1. docker compose exec -ti server bash # Get a Bash shell in the server container.
  2. docker compose exec -ti client bash # Get a Bash shell in the client container.

List of Examples