Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ EXPOSE 8082/tcp

ENV APP_VERSION=$APP_VERSION
ENV RR_LOG_LEVEL=error
ENV RR_HTTP_NUM_WORKERS=2
ENV RR_CENTRIFUGE_NUM_WORKERS=3
ENV RR_HTTP_NUM_WORKERS=2
ENV RR_TCP_NUM_WORKERS=2
ENV RR_CENTRIFUGE_PROXY_ADDRESS="tcp://127.0.0.1:10001"
ENV RR_CENTRIFUGE_GRPC_API_ADDRESS="127.0.0.1:10000"

Expand Down
61 changes: 48 additions & 13 deletions .rr-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,67 @@ server:
command: "php app.php register:modules"

logs:
level: ${RR_LOG_LEVEL:-info}
# Logging mode can be "development", "production" or "raw".
# Do not forget to change this value for production environment.
mode: ${RR_LOG_MODE:-production}
# Encoding format can be "console" or "json" (last is preferred for production usage).
encoding: ${RR_LOG_ENCODING:-json}
# Logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_LEVEL:-warn}
channels:
http:
# HTTP plugin logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_HTTP_LEVEL:-warn}
tcp:
# TCP plugin logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_TCP_LEVEL:-warn}
jobs:
# JOBS plugin logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_TCP_LEVEL:-warn}
centrifuge:
# Centrifuge plugin logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_CENTRIFUGE_LEVEL:-warn}
server:
# Server logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_SERVER_LEVEL:-warn}
service:
# Service logging level can be "panic", "error", "warn", "info", "debug".
level: ${RR_LOG_SERVICE_LEVEL:-warn}

http:
address: 127.0.0.1:8082
middleware: [ "headers" ]
headers:
cors:
allowed_origin: "*"
allowed_headers: "*"
allowed_origin: ${RR_HTTP_ALLOWED_ORIGIN:-*}
allowed_headers: ${RR_HTTP_ALLOWED_HEADERS:-*}
allowed_methods: "GET,POST,PUT,DELETE"
allow_credentials: true
allow_credentials: ${RR_HTTP_ALLOW_CREDENTIALS:-true}
exposed_headers: "Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma"
max_age: 600
pool:
num_workers: ${RR_HTTP_NUM_WORKERS}
num_workers: ${RR_HTTP_NUM_WORKERS:-1}

tcp:
servers:
monolog:
addr: :9913
# Address to listen.
addr: ${RR_TCP_MONOLOG_ADDR:-:9913}
delimiter: "\n"
var-dumper:
addr: :9912
# Address to listen.
addr: ${RR_TCP_VAR_DUMPER_ADDR:-:9912}
delimiter: "\n"
smtp:
addr: :1025
# Address to listen.
addr: ${RR_TCP_SMTP_ADDR:-:1025}
# Chunks that RR uses to read the data. In bytes.
# If you expect big payloads on a TCP server, to reduce `read` syscalls,
# would be a good practice to use a fairly big enough buffer.
# Default: 1024 * 1024 * 50 (50MB)
read_buf_size: ${RR_TCP_READ_BUF_SIZE:-50485760}
pool:
num_workers: ${RR_TCP_NUM_WORKERS}
num_workers: ${RR_TCP_NUM_WORKERS:-2}

kv:
local:
Expand All @@ -49,26 +82,28 @@ kv:

jobs:
consume: [ ]
pool:
num_workers: ${RR_JOBS_NUM_WORKERS:-1}

service:
nginx:
service_name_in_log: true
remain_after_exit: true
restart_sec: 1
restart_sec: 5
command: "/usr/sbin/nginx"
centrifuge:
service_name_in_log: true
remain_after_exit: true
restart_sec: 1
restart_sec: 5
command: "./bin/centrifugo --config=centrifugo.json"
dolt:
service_name_in_log: true
remain_after_exit: true
restart_sec: 1
restart_sec: 5
command: "./bin/dolt sql-server --data-dir=.db"

centrifuge:
proxy_address: ${RR_CENTRIFUGE_PROXY_ADDRESS}
grpc_api_address: ${RR_CENTRIFUGE_GRPC_API_ADDRESS}
poll:
num_workers: ${RR_CENTRIFUGE_NUM_WORKERS}
num_workers: ${RR_CENTRIFUGE_NUM_WORKERS:-2}
12 changes: 8 additions & 4 deletions .rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ http:
exposed_headers: "Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma"
max_age: 600
pool:
num_workers: 2
num_workers: 1

tcp:
servers:
Expand All @@ -39,6 +39,8 @@ tcp:
delimiter: "\n"
smtp:
addr: 127.0.0.1:1025
pool:
num_workers: 2

kv:
local:
Expand All @@ -47,22 +49,24 @@ kv:

jobs:
consume: [ ]
pool:
num_workers: 1

service:
centrifuge:
service_name_in_log: true
remain_after_exit: true
restart_sec: 1
restart_sec: 5
command: "./bin/centrifugo --config=centrifugo.json"
dolt:
service_name_in_log: true
remain_after_exit: true
restart_sec: 1
restart_sec: 5
command: "./bin/dolt sql-server --data-dir=.db"

centrifuge:
proxy_address: "tcp://127.0.0.1:10001"
grpc_api_address: "tcp://127.0.0.1:10000"
pool:
reset_timeout: 10
num_workers: 5
num_workers: 2
2 changes: 1 addition & 1 deletion app/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
),

// Only for testing purposes
// SQLite does not support multiple connections in the same time
// SQLite does not support multiple connections simultaneously
'sqlite' => new SQLiteDriverConfig(
connection: new FileConnectionConfig(database: directory('runtime') . 'test.db'),
options: [
Expand Down
16 changes: 1 addition & 15 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ services:
DB_DRIVER: pgsql
DB_HOST: buggregator-pgsql

# PERSISTENCE_DRIVER: mongodb
MONGODB_CONNECTION: mongodb://homestead:secret@buggregator-mongo:27017
MONGODB_DATABASE: buggregator

# Auth
AUTH_ENABLED: false
AUTH_PROVIDER_URL: https://${AUTH_DOMAIN}.us.auth0.com
Expand All @@ -63,17 +59,7 @@ services:
- ./app:/app/app
- ./runtime:/app/runtime
- ./vendor:/app/vendor
networks:
- buggregator-network

buggregator-mongo:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: homestead
MONGO_INITDB_ROOT_PASSWORD: secret
MONGO_INITDB_DATABASE: buggregator
ports:
- 27017:27017
- ./.rr-prod.yaml:/app/.rr-prod.yaml
networks:
- buggregator-network

Expand Down
Loading