0

I want to install Yii2 advanced template with nginx server , mysql 8 DB , php 8.2 , and to enable xdebug also inside

I tried to install template from official website here, & from git here, or here

in Dockerfile :

FROM yiisoftware/yii2-php:8.1-apache

# Change document root for Apache
RUN sed -i -e 's|/app/web|/app/backend/web|g' /etc/apache2/sites-available/000-default.conf

i tried to change it for :

FROM yiisoftware/yii2-php:8.2-fpm

but it seems there are other statements to be added ?

i tried those also :

RUN apt-get update && apt-get install -y \
    libzip-dev \
    unzip \
    && docker-php-ext-install pdo pdo_mysql zip

# Set the working directory
WORKDIR /app

# Copy the application code to the container
COPY . /app

# Change document root for nginx
RUN sed -i 's|/app/web|/app/frontend/web|g' /etc/nginx/conf.d/default.conf

EXPOSE 80

but it dose not work , also i try to update docker-compose.yml to create separate nginx image but it's not working

*Related questions : *

  • Where can i find php modules to add xdebug to it ?
  • I tried to view phpinfo() file but it's not working also, i create it inside /var/www/html?
  • For any change of configuration how can i restart server, or alternatively can i add them with docker build commands ?
Toqa Abbas
  • 11
  • 3
  • Do you read the README.md file? `To enable Xdebug, set PHP_ENABLE_XDEBUG=1 in .env file` – SiZE Aug 10 '23 at 06:01
  • Test it with `docker-compose run --rm -e PHP_ENABLE_XDEBUG=1 php php -v`. You should get this string `Enabled xdebug`. – SiZE Aug 10 '23 at 06:02

0 Answers0