Skip to content

Commit

Permalink
ISSUE-276 RoadRunner setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DumitracheAdrian committed May 30, 2024
1 parent 83615ec commit 8ee0907
Show file tree
Hide file tree
Showing 9 changed files with 629 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends libicu-dev
RUN docker-php-ext-install intl

# ROADRUNNER
RUN docker-php-ext-install sockets

#localisation file
RUN rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ composer-normalize
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###

###> baldinof/roadrunner-bundle ###
/bin/rr
###< baldinof/roadrunner-bundle ###
32 changes: 32 additions & 0 deletions .rr.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "3"

server:
command: "php public/index.php"
env:
- APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime

http:
address: 0.0.0.0:8080
ssl:
address: :443
cert: certs/draw.com.crt
key: certs/draw.com.key
pool:
debug: true
middleware: [ "static", "gzip" ]
uploads:
forbid: [ ".php", ".exe", ".bat" ]
static:
dir: "public"
forbid: [ ".php", ".htaccess" ]

logs:
mode: development
channels:
http:
level: debug # Log all http requests, set to info to disable
server:
level: info # Everything written to worker stderr is logged
mode: raw
metrics:
level: debug
37 changes: 37 additions & 0 deletions .rr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: "3"

server:
command: "php public/index.php"
env:
- APP_RUNTIME: Baldinof\RoadRunnerBundle\Runtime\Runtime

http:
address: 0.0.0.0:8080
pool:
debug: false
middleware: [ "static", "gzip" ]
uploads:
forbid: [ ".php", ".exe", ".bat" ]
static:
dir: "public"
forbid: [ ".php", ".htaccess" ]

logs:
mode: production
channels:
http:
level: debug # Log all http requests, set to info to disable
server:
level: info # Everything written to worker stderr is logged
mode: raw
metrics:
level: error

# Uncomment to use metrics integration
# rpc:
# listen: tcp://127.0.0.1:6001

# Uncomment to use metrics integration
# metrics:
# # prometheus client address (path /metrics added automatically)
# address: "0.0.0.0:9180"
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ext-json": "*",
"ext-mongodb": "*",
"ext-simplexml": "*",
"ext-sockets": "*",
"ext-zip": "*",
"aws/aws-sdk-php": "^3.171",
"doctrine/common": "^3.1",
Expand Down Expand Up @@ -63,7 +64,8 @@
"doctrine/mongodb-odm-bundle": "*",
"fidry/cpu-core-counter": "^1.1",
"knplabs/doctrine-behaviors": "*",
"symfony/notifier": "^6.4.0"
"symfony/notifier": "^6.4.0",
"baldinof/roadrunner-bundle": "^3.1"
},
"require-dev": {
"ext-pcntl": "*",
Expand Down
Loading

0 comments on commit 8ee0907

Please sign in to comment.