Skip to content

Commit

Permalink
Merge pull request #214 from ragusa87/xdebug
Browse files Browse the repository at this point in the history
feat(docker): Xdebug support
  • Loading branch information
SergioMendolia authored Dec 1, 2024
2 parents bce4bba + 1bc209d commit 8f50cec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
FROM ghcr.io/biblioverse/biblioteca-docker:latest
FROM ghcr.io/biblioverse/biblioteca-docker:latest AS base
WORKDIR /var/www/html

FROM base AS prod
USER root
COPY . /var/www/html



WORKDIR /var/www/html

RUN composer install
RUN npm install
RUN npm run build

RUN chown -R www-data:www-data /var/www/html

USER www-data

FROM base AS dev
USER root
RUN /usr/local/bin/install-php-extensions xdebug

RUN echo ' \n\
[xdebug] \n\
xdebug.idekey=PHPSTORM \n\
xdebug.mode=off \n\
xdebug.client_host=host.docker.internal\n ' >> /usr/local/etc/php/conf.d/biblioteca.ini
USER www-data
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
biblioteca:
image: ghcr.io/biblioverse/biblioteca-docker:latest
build:
target: prod
command: ["/bin/sh", "-c" , "crontab /var/www/html/config/crontab.txt && apache2-foreground" ]
ports:
- "48480:8080" # Web
Expand Down

0 comments on commit 8f50cec

Please sign in to comment.