@@ -11,49 +11,49 @@ to start the application on host machine.
1111
1212## Docker Compose setup
1313** 1. Download the repository.**
14- ``` bash
15- $ git clone git@github.com:temporalio/samples-php.git
16- $ cd samples-php
14+ ``` shell
15+ git clone git@github.com:temporalio/samples-php.git
16+ cd samples-php
1717```
1818
1919** 2. Build docker images.**
20- ``` bash
21- $ docker compose build
20+ ``` shell
21+ docker compose build
2222```
2323
2424** 3. Start server and application containers.**
25- ``` bash
26- $ docker compose up
25+ ``` shell
26+ docker compose up
2727```
2828
2929** 4. Run a sample**
3030
3131To run a sample in docker use:
3232
33- ``` bash
34- $ docker compose exec app php app.php {sample-name}
33+ ``` shell
34+ docker compose exec app php app.php {sample-name}
3535```
3636
3737To observe active workers:
3838
39- ``` bash
40- $ docker compose exec app rr workers -i
39+ ``` shell
40+ docker compose exec app rr workers -i
4141```
4242
4343To run feature tests in docker use:
4444
45- ``` bash
46- $ docker compose exec app composer test:feat
45+ ``` shell
46+ docker compose exec app composer test:feat
4747````
4848
4949# # Local Setup
5050** 1. Make sure you have PHP 8.1, or higher, installed.**
5151
5252** 2. Clone this repo and change directory into the root of the project.**
5353
54- ` ` ` bash
55- $ git clone https://github.com/temporalio/samples-php
56- $ cd samples-php
54+ ` ` ` shell
55+ git clone https://github.com/temporalio/samples-php
56+ cd samples-php
5757` ` `
5858
5959** 3. Install the gRPC PHP extension**
@@ -64,41 +64,42 @@ Follow the instructions here: [https://cloud.google.com/php/grpc](https://cloud.
6464
6565Note: For Windows machines, you can download the ` php_grpc.dll` from the [PECL website](https://pecl.php.net/package/gRPC)
6666
67- Make sure you follow the all the steps to activate the gRPC extension in your ` php.ini` file and install the protobuf runtime library in your project.
67+ Make sure you follow all the steps to activate the gRPC extension in your ` php.ini` file and install the protobuf runtime library in your project.
6868
6969** 4. Install additional PHP dependencies**
7070
71- ` ` ` bash
72- $ cd app
73- $ composer install
71+ ` ` ` shell
72+ cd app
73+ composer install
7474` ` `
7575
76- ** 5. Download RoadRunner application server**
76+ ** 5. Download Temporal server and RoadRunner application server **
7777
78- The Temporal PHP SDK requires the RoadRunner v2023.2 application server and supervisor to run Activities and Workflows in a scalable way .
78+ The Temporal PHP SDK requires the RoadRunner application server and supervisor to run Activities and Workflows scalably .
7979
80- ` ` ` bash
81- $ cd app
82- $ ./vendor/bin/rr get
80+ Run the following command to download the necessary binaries:
81+
82+ ` ` ` shell
83+ composer get:binaries
8384` ` `
8485
8586Note: You can install RoadRunner manually by downloading its binary from the [release page](https://github.com/spiral/roadrunner/releases/tag/v1.9.2).
8687
87- ** 6. Run the Temporal Server**
88+ Note: Check the [Quick install guide](https://docs.temporal.io/docs/server/quick-install) to install Temporal Server manually.
8889
89- The Temporal Server must be up and running for the samples to work.
90- The fastest way to do that is by following the [Quick install guide](https://docs.temporal.io/docs/server/quick-install).
90+ ** 6. Run the Temporal Server**
9191
92- You can also run the included ` docker-compose.yml` file. Make sure to comment ` app` section.
92+ ` ` ` shell
93+ ./temporal server start-dev
94+ ` ` `
9395
9496** 7. Start the application using RoadRunner**
9597
9698By default, all samples run using a single RoadRunner Server instance.
9799To start the application using RoadRunner:
98100
99- ` ` ` bash
100- $ cd app
101- $ ./rr serve
101+ ` ` ` shell
102+ ./rr serve
102103` ` `
103104
104105You can now interact with the samples.
0 commit comments