Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docker): Xdebug support #214

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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