Skip to content

Commit

Permalink
feat(docker): Xdebug support
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusa87 committed Dec 1, 2024
1 parent bce4bba commit 1bc209d
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 1bc209d

Please sign in to comment.