-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// launch.json is used to configure the debugger in Visual Studio Code at a project level. | ||
// | ||
|
||
{ | ||
// 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, | ||
"pathMappings": { | ||
"/var/www/html": "${workspaceFolder}/src" // Replace with your local path | ||
} | ||
}, | ||
{ | ||
"name": "Launch currently open script", | ||
"type": "php", | ||
"request": "launch", | ||
"program": "${file}", | ||
"cwd": "${fileDirname}", | ||
"port": 0, | ||
"runtimeArgs": [ | ||
"-dxdebug.start_with_request=yes" | ||
], | ||
"env": { | ||
"XDEBUG_MODE": "debug,develop", | ||
"XDEBUG_CONFIG": "client_port=${port}" | ||
} | ||
}, | ||
{ | ||
"name": "Launch Built-in web server", | ||
"type": "php", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"-dxdebug.mode=debug", | ||
"-dxdebug.start_with_request=yes", | ||
"-S", | ||
"localhost:0" | ||
], | ||
"program": "", | ||
"cwd": "${workspaceRoot}", | ||
"port": 9003, | ||
"serverReadyAction": { | ||
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", | ||
"uriFormat": "http://localhost:%s", | ||
"action": "openExternally" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"php.version": "8.4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# This file defines the Docker image used to create a Docker container | ||
# | ||
|
||
# Base image: Apache with PHP 8.3 (official) | ||
FROM php:8.3-apache | ||
|
||
# Install Xdebug | ||
RUN apt-get update \ | ||
&& pecl install xdebug \ | ||
&& docker-php-ext-enable xdebug | ||
|
||
# Copy the local xdebug.ini file to the specified location in the container | ||
COPY ./docker/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# This file defines the services that make up the application | ||
# Each service is a container that runs a single process | ||
# Each container is built from an image, according to the Dockerfile specified in the build section | ||
# For more information, see: https://docs.docker.com/compose/compose-file/ | ||
# | ||
|
||
version: '3.9' # Specify the Docker Compose version | ||
services: | ||
web: # Define the web service | ||
build: # Define how to build the Docker image | ||
context: . # Directory containing the Dockerfile | ||
dockerfile: Dockerfile # Specify the Dockerfile (optional if named Dockerfile) | ||
ports: # Specify port mappings | ||
- "8000:80" # Map port 8000 on the host to port 80 in the container | ||
volumes: # Define volume mounts | ||
- "./src:/var/www/html" # Mount the local ./src directory to /var/www/html in the container | ||
restart: always # Always restart the container if it stops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
; | ||
; Docker Xdebug configuration | ||
; | ||
|
||
[xdebug] | ||
zend_extension=xdebug.so | ||
xdebug.mode=debug | ||
xdebug.start_with_request=yes | ||
xdebug.client_host=host.docker.internal ; For Docker Desktop | ||
xdebug.client_port=9003 ; Default Xdebug port | ||
xdebug.log=/tmp/xdebug.log ; Optional: specify log file |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.