Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #91 from buggregator/feature/upgrade
Browse files Browse the repository at this point in the history
Server upgrade
  • Loading branch information
butschster committed Jul 29, 2022
2 parents ea8910c + 728c6f9 commit 6ccd291
Show file tree
Hide file tree
Showing 19 changed files with 2,081 additions and 1,994 deletions.
11 changes: 4 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ AUTH_PASSWORD=secret
LOG_CHANNEL=stderr
LOG_LEVEL=debug

DB_CONNECTION=sqlite

#DB_CONNECTION=mysql
#DB_DATABASE=database_name
#DB_USERNAME=database_username
#DB_PASSWORD=database_password
#DB_HOST=localhost
DB_CONNECTION=mysql
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=roadrunner
CACHE_DRIVER=roadrunner
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.0' ]
php-versions: [ '8.1' ]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.0', '8.1' ]
php-versions: [ '8.1' ]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions .rr.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: "2.7"

rpc:
listen: tcp:https://127.0.0.1:6001

Expand Down Expand Up @@ -56,8 +58,10 @@ jobs:
pipelines:
default:
driver: memory
config: { }
events:
driver: memory
config: { }
pool:
num_workers: 2

Expand Down
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM php:8.0-alpine
FROM php:8.1-alpine

# Optional, force UTC as server time
RUN echo "UTC" > /etc/timezone

RUN docker-php-ext-install opcache && docker-php-ext-enable opcache
RUN docker-php-ext-install pcntl
RUN apk add --no-cache libzip-dev sqlite-dev supervisor git && \
RUN apk add --no-cache libzip-dev sqlite-dev git && \
docker-php-ext-configure zip && \
docker-php-ext-install zip

RUN set -ex && apk --no-cache add postgresql-dev
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
RUN docker-php-ext-install pdo pdo_sqlite pdo_pgsql pdo_mysql sockets
RUN docker-php-ext-install pdo pdo_pgsql pdo_mysql sockets

RUN apk add --update mysql mysql-client && rm -f /var/cache/apk/*

RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer

Expand All @@ -26,6 +28,11 @@ RUN composer install
RUN chmod 0777 storage -R
RUN chmod 0777 bootstrap -R

# These lines moved to the end allow us to rebuild image quickly after only these files were modified.
COPY docker/server/startup.sh /startup.sh
COPY docker/server/my.cnf /etc/mysql/my.cnf
RUN chmod +x /startup.sh

# Create .env file
RUN cp .env.example .env
RUN cat .env.example
Expand All @@ -36,4 +43,4 @@ EXPOSE 1025
EXPOSE 9912
EXPOSE 9913

CMD ./rr serve
CMD sh -c /startup.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Also you can use a termial to collect dump output if you don't want to use a bro

## Technological stack

- [Laravel 8](https://laravel.com/)
- [Laravel 9](https://laravel.com/)
- [InertiaJs](https://inertiajs.com/)
- [RoadRunner](https://roadrunner.dev/) Http, Websocket, TCP, Queue, Cache server in one bottle
- [Vue](https://vuejs.org/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class SQLiteDriver extends \Cycle\Database\Driver\SQLite\SQLiteDriver
{
public static function create(DriverConfig $config): self
public static function create(DriverConfig $config): static
{
return new self(
$config,
Expand Down
4 changes: 0 additions & 4 deletions app/Infrastructure/RoadRunner/Cache/CacheServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ public function register()
Cache::extend('roadrunner', function ($app) {
$factory = new Factory(RPC::create(config('roadrunner.rpc.host')));

if (! $factory->isAvailable()) {
return Cache::driver('array');
}

return Cache::repository(
new RoadRunnerStore(
$factory->select(config('roadrunner.cache.storage', 'cache'))
Expand Down
3 changes: 2 additions & 1 deletion app/Modules/Monolog/Console/StreamHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public function handle(array $payload): void
'levelColor' => $levelColor,
'level' => $payload['payload']['level_name'].'' ?? 'DEBUG',
'messages' => explode("\n", $payload['payload']['message']),
])
]),
0
);

// It can't be sent to HTML
Expand Down
3 changes: 2 additions & 1 deletion app/Modules/Ray/Console/Handlers/AbstractHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class_basename($payload['origin']['file']),
'color' => $data['color'] ?? 'gray',
'label' => $payload['content']['label'] ?? null,
'content' => view($this->getViewName($payload), $data),
])
]),
0
);
}

Expand Down
3 changes: 2 additions & 1 deletion app/Modules/Sentry/Console/StreamHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ private function renderException(array $exception): void
'message' => $exception['value'],
'trace' => iterator_to_array($this->prepareTrace($frames)),
'codeSnippet' => $this->renderCodeSnippet($editorFrame),
])
]),
0
);
}

Expand Down
3 changes: 2 additions & 1 deletion app/Modules/Smtp/Console/StreamHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function handle(array $payload): void
'addresses' => $addresses,
'attachments' => $attachments,
'body' => $payload['payload']['text'],
])
]),
0
);
}

Expand Down
20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@
],
"require": {
"php": "^8.0",
"cycle/annotated": "2.0.x-dev",
"cycle/orm": "2.0.x-dev",
"cycle/schema-migrations-generator": "dev-master",
"cycle/annotated": "^3.0",
"cycle/orm": "^2.0",
"cycle/schema-migrations-generator": "^2.0",
"cycle/schema-renderer": "^1.0",
"eventsauce/eventsauce": "^1.2",
"facade/ignition": "^2.5",
"spatie/laravel-ignition": "^1.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"inertiajs/inertia-laravel": "^0.4.3",
"laravel/framework": "^8.54",
"inertiajs/inertia-laravel": "^0.6",
"laravel/framework": "^9.0",
"laravel/jetstream": "^2.3",
"laravel/sanctum": "^2.6",
"laravel/tinker": "^2.5",
"nunomaduro/termwind": "dev-master",
"nunomaduro/termwind": "^1.0",
"php-http/message": "^1.11",
"spatie/laravel-route-attributes": "^1.9",
"spiral/roadrunner-broadcast": "dev-master",
"spiral/roadrunner-broadcast": "^2.0",
"spiral/roadrunner-cli": "^2.0",
"spiral/roadrunner-jobs": "^2.0",
"spiral/roadrunner-kv": "^2.1",
"spiral/roadrunner-laravel": "^5.2",
"spiral/roadrunner-tcp": "*",
"spiral/roadrunner-tcp": "^2.0",
"symfony/messenger": "^5.3",
"tightenco/ziggy": "^1.0",
"zbateson/mail-mime-parser": "^2.0"
Expand All @@ -42,7 +42,7 @@
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3.3",
"rector/rector": "^0.12.4"
},
Expand Down
Loading

0 comments on commit 6ccd291

Please sign in to comment.