Skip to content

Commit e5b2c21

Browse files
committed
Initial commit
0 parents  commit e5b2c21

File tree

9 files changed

+1894
-0
lines changed

9 files changed

+1894
-0
lines changed

.docker/php/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM php:8.2
2+
COPY --from=composer /usr/bin/composer /usr/bin/composer
3+
RUN apt-get update && apt-get -y install libzip-dev libicu-dev
4+
RUN docker-php-ext-install mysqli zip intl
5+
RUN pecl install xdebug-3.2.0
6+
RUN docker-php-ext-enable xdebug
7+
WORKDIR /app
8+
9+
ARG UID=1000
10+
ARG USER=php
11+
12+
RUN adduser $USER --disabled-password --home /$USER --uid $UID
13+
14+
COPY ./xdebug.ini /usr/local/etc/php/conf.d/99_xdebug.ini
15+
16+
CMD ["tail", "-f", "/dev/null"]

.docker/php/xdebug.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
zend_extension=xdebug.so
2+
3+
[xdebug]
4+
xdebug.mode=debug,develop,coverage
5+
xdebug.client_host=host.docker.internal
6+
xdebug.start_with_request=yes

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Listen for Xdebug",
9+
"type": "php",
10+
"request": "launch",
11+
"port": 9003,
12+
"pathMappings": {
13+
"/app": "${workspaceFolder}"
14+
}
15+
}
16+
]
17+
}

composer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "cmayo/php-cli-skeleton",
3+
"authors": [
4+
{
5+
"name": "Carlos Mayo",
6+
"email": "[email protected]"
7+
}
8+
],
9+
"require": {
10+
"php": ">=8.2"
11+
},
12+
"autoload": {
13+
"psr-4": {
14+
"App\\": "src/"
15+
}
16+
},
17+
"autoload-dev": {
18+
"psr-4": {
19+
"App\\Tests\\": "tests/"
20+
}
21+
},
22+
"require-dev": {
23+
"phpunit/phpunit": "^9"
24+
}
25+
}

0 commit comments

Comments
 (0)