diff --git a/README.md b/README.md index a03058116..46764f1b0 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ DB_CRM_PASSWORD=password ## Running the project with Laravel Octane -After doing all the steps above, you could run the project with Laravel Octane by using the command ```php artisan octane:start --port 8080 --host=0.0.0.0```. +After doing all the steps above, you could run the project with Laravel Octane by using the command ```php artisan octane:start --server=swoole --host=0.0.0.0 --port=8000```. Use `--watch` in development allowing you to refresh modified files, this works assuming to have `npm install chokidar` installed in the project. **** @@ -116,12 +116,3 @@ Note: - To install Swoole you can use the command ```pecl install swoole``` - For production remove `--watch` from the command. - roles_kanvas_legacy will be deleted in the future. - - -## Feature Labs - -### Run the project using FrankenPHP - -``` sh -docker compose -f docker-compose.franken.yml up -d --build -``` diff --git a/composer.json b/composer.json index d11339f85..c1eecf08a 100644 --- a/composer.json +++ b/composer.json @@ -48,6 +48,7 @@ "spatie/laravel-queueable-action": "^2.15", "spatie/laravel-webhook-server": "^3.8", "stripe/stripe-php": "^15.0", + "swoole/ide-helper": "*", "symfony/expression-language": "^7.0", "symfony/http-client": "^7.0", "symfony/mailgun-mailer": "^7.0", diff --git a/composer.lock b/composer.lock index 6eebabc5e..58818d0ad 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a3341b6c7ce247b61dd696be4603ceec", + "content-hash": "6ef8502e152f3ff364c7d6a29ed42aa1", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -9619,6 +9619,38 @@ }, "time": "2024-07-25T21:00:20+00:00" }, + { + "name": "swoole/ide-helper", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/swoole/ide-helper.git", + "reference": "9cfc6669b83be0fa6fface91a6f372a0bb84bf1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swoole/ide-helper/zipball/9cfc6669b83be0fa6fface91a6f372a0bb84bf1a", + "reference": "9cfc6669b83be0fa6fface91a6f372a0bb84bf1a", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Team Swoole", + "email": "team@swoole.com" + } + ], + "description": "IDE help files for Swoole.", + "support": { + "issues": "https://github.com/swoole/ide-helper/issues", + "source": "https://github.com/swoole/ide-helper/tree/5.1.3" + }, + "time": "2024-06-17T05:45:20+00:00" + }, { "name": "symfony/cache", "version": "v7.1.3", diff --git a/docker-compose.franken.yml b/docker-compose.franken.yml deleted file mode 100644 index 44271e4bf..000000000 --- a/docker-compose.franken.yml +++ /dev/null @@ -1,132 +0,0 @@ -services: - php: - container_name: php${APP_CONTAINER_NAME} - ports: - - "80:80" - build: - context: . - dockerfile: franken.Dockerfile - extra_hosts: - - 'host.docker.internal:host-gateway' - environment: - WWWUSER: '${WWWUSER}' - LARAVEL_SAIL: 1 - XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' - XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' - volumes: - - ./:/app - - caddy_data:/data - - caddy_config:/config - networks: - - sail - depends_on: - - mysql - - redis - mysql: - container_name: mysql${APP_CONTAINER_NAME} - image: 'mysql:8.3.0' - command: --innodb_strict_mode=0 --innodb_log_file_size=512M - ports: - - '${FORWARD_DB_PORT:-3306}:3306' - environment: - MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' - MYSQL_ROOT_HOST: "%" - MYSQL_DATABASE: '${DB_DATABASE}' - MYSQL_USER: '${DB_USERNAME}' - MYSQL_PASSWORD: '${DB_PASSWORD}' - MYSQL_ALLOW_EMPTY_PASSWORD: 1 - volumes: - - 'sail-mysql:/var/lib/mysql' - networks: - - sail - healthcheck: - test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ] - retries: 3 - timeout: 5s - redis: - container_name: redis${APP_CONTAINER_NAME} - image: 'redis:alpine' - ports: - - '${FORWARD_REDIS_PORT:-6379}:6379' - volumes: - - 'sail-redis:/data' - networks: - - sail - healthcheck: - test: [ "CMD", "redis-cli", "ping" ] - retries: 3 - timeout: 5s - - rabbitmq: - container_name: rabbitmq${APP_CONTAINER_NAME} - image: rabbitmq:3.9.21-management-alpine - hostname: "rabbit" - labels: - NAME: "rabbitmq1" - volumes: - - "sail-rabbitmq:/var/lib/rabbitmq" - healthcheck: - test: rabbitmq-diagnostics -q ping - interval: 30s - timeout: 30s - retries: 3 - ports: - - "15672:15672" - - "5672:5672" - networks: - - sail - mailpit: - image: 'axllent/mailpit:latest' - ports: - - '${FORWARD_MAILPIT_PORT:-1025}:1025' - - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025' - networks: - - sail - minio1: - image: minio/minio - container_name: minio${APP_CONTAINER_NAME} - restart: always - environment: - MINIO_ACCESS_KEY: minio - MINIO_SECRET_KEY: ${AWS_SECRET_ACCESS_KEY} - command: server /data --console-address ":9001" - ports: - - "9002:9000" - - "9001:9001" - volumes: - - s3data:/data - networks: - - sail - meilisearch: - container_name: meilisearch - image: getmeili/meilisearch:v1.1 - environment: - - http_proxy - - https_proxy - - MEILI_MASTER_KEY=${MEILI_MASTER_KEY:-masterKey} - - MEILI_NO_ANALYTICS=${MEILI_NO_ANALYTICS:-true} - - MEILI_ENV=${MEILI_ENV:-development} - - MEILI_LOG_LEVEL - - MEILI_DB_PATH=${MEILI_DB_PATH:-/data.ms} - ports: - - ${MEILI_PORT:-7700}:7700 - networks: - - sail - volumes: - - meilisearch:/data.ms - restart: unless-stopped -networks: - sail: - driver: bridge -volumes: - pma: - sail-mysql: - driver: local - sail-redis: - driver: local - sail-rabbitmq: - driver: local - s3data: - meilisearch: - caddy_data: - caddy_config: diff --git a/docker/nginx.conf b/docker/nginx.conf index 4b4948e35..005b27f40 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -17,7 +17,7 @@ server { return 204; } - proxy_pass http://php:8080; + proxy_pass http://php:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/franken.Dockerfile b/franken.Dockerfile deleted file mode 100644 index eb468c242..000000000 --- a/franken.Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM dunglas/frankenphp - -ENV SERVER_NAME="http://" - -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - build-essential \ - libpng-dev \ - libjpeg62-turbo-dev \ - libfreetype6-dev \ - locales \ - zip \ - jpegoptim optipng pngquant gifsicle \ - unzip \ - git \ - curl \ - lua-zlib-dev \ - libmemcached-dev \ - redis \ - vim - -RUN chmod +x /usr/local/bin/install-php-extensions && sync && \ - install-php-extensions mbstring pdo_mysql zip exif pcntl gd memcached redis swoole opcache curl readline sqlite3 msgpack igbinary pcov sockets - -COPY --from=composer:2 /usr/bin/composer /usr/bin/composer - -COPY Caddyfile /etc/caddy/Caddyfile - -COPY . /app - -WORKDIR /app - -RUN composer install --optimize-autoloader - -# COPY docker/weroad-php.ini $PHP_INI_DIR/conf.d/ -COPY docker/docker-php-ext-opcache.ini $PHP_INI_DIR/conf.d/ - -RUN cp docker/php.ini $PHP_INI_DIR/php.ini; \ - sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/' $PHP_INI_DIR/php.ini; - -CMD /bin/bash -c "php artisan cache:clear \ - && frankenphp run --config /etc/caddy/Caddyfile --adapter caddyfile" \ No newline at end of file