Showing posts with label Laradock. Show all posts
Showing posts with label Laradock. Show all posts

Thursday, 20 February 2025

Laradock in Mac Errors

Error: Composer detected issues in your platform: Your Composer dependencies require a 64-bit build of PHP.

=> fix docker-compose.yml

### Workspace Utilities ##################################
workspace:
restart: always
platform: linux/amd64
build:
context: ./workspace
.......

### PHP-FPM ##############################################
php-fpm:
restart: always
platform: linux/amd64
build:
context: ./php-fpm

Thank you.

Sunday, 19 May 2024

Xdebug in Laradock

1. What to use Xdebug for?

2. How to use Xdebug?

- Update .env

PHP_FPM_INSTALL_XDEBUG=true
PHP_FPM_XDEBUG_PORT=9003

- Add /php-fpm/xdebug.ini

xdebug.client_host="host.docker.internal"
zend_extension=xdebug
xdebug.start_with_request=yes
xdebug.discover_client_host=on

- Rebuild php-fpm

docker compose up --build --force-recreate --no-deps -d php-fpm

- Update .vscode/launch.json

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "log": true,
            "pathMappings": {
                "/var/www/cpweb": "${workspaceRoot}",
            },
        }
    ]
}
 

3. What does Xdebug include?

4. Compare way to use Laradock for 2 projects

-------------------------
Detailed instructions

Thank you.

Saturday, 4 May 2024

Laradock in Docker

1. What to use Laradock for?
- To use existed docker file, config in docker

2. How to use Docker Pipeline Plugin?

3. What does Docker Pipeline Plugin include?

- Xdebug in Laradock

4. Compare way to use Laradock for 2 projects

- Way 1: One container
+ Save the volume (case same version nginx, apache, php, mysql, ...)

- Way 2: Two container
+ Ensure consistent version, config and extension (nginx, apache, php, mysql...)  from local -> development -> staging -> production

=> Way 2 better

-------------------------
Detailed instructions

Thank you.

Publish npm package

  Để publish   pav-kit  lên NPM, bạn hãy làm theo các bước dưới đây. Tôi đã tạo thêm file  index.js  để đảm bảo gói tin hợp lệ. Bước 1: Tạo ...