-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass adding dockers support including xdebug profile for vscode. (
#366) Co-authored-by: Arvin Singla <arvin@Arvins-MacBook-Pro.local>
- Loading branch information
1 parent
fb053b0
commit c27c84a
Showing
5 changed files
with
64 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,18 @@ | ||
{ | ||
// 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": false, | ||
"pathMappings": { | ||
"/var/www/html/": "${workspaceFolder}" | ||
} | ||
} | ||
] | ||
} |
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,31 @@ | ||
version: "3" | ||
|
||
services: | ||
web: | ||
build: | ||
context: ./docker/php | ||
dockerfile: Dockerfile | ||
restart: 'always' | ||
depends_on: | ||
- mariadb | ||
volumes: | ||
- .:/var/www/html/ | ||
- ./trust:/var/www/trust | ||
- ./docker/php/conf.d/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
- ./docker/php/conf.d/error_reporting.ini:/usr/local/etc/php/conf.d/error_reporting.ini | ||
ports: | ||
- '8080:80' | ||
links: | ||
- mariadb | ||
mariadb: | ||
image: "mariadb" | ||
restart: 'always' | ||
ports: | ||
- 3306:3306 | ||
expose: | ||
- "3306" | ||
environment: | ||
MYSQL_ROOT_PASSWORD: "abc123" | ||
MYSQL_DATABASE: "formulize" | ||
MYSQL_USER: "user" | ||
MYSQL_PASSWORD: "password" |
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,7 @@ | ||
FROM php:8.1-apache | ||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev | ||
RUN docker-php-ext-configure gd --with-jpeg=/usr/include/ | ||
RUN docker-php-ext-install mysqli pdo pdo_mysql gd | ||
RUN pecl install xdebug | ||
RUN docker-php-ext-enable mysqli pdo pdo_mysql gd xdebug | ||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.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 @@ | ||
error_reporting=E_ALL |
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,7 @@ | ||
zend_extension=xdebug | ||
|
||
[xdebug] | ||
xdebug.mode=develop,debug | ||
xdebug.discover_client_host=true | ||
xdebug.client_host=host.docker.internal | ||
xdebug.start_with_request=yes |