diff --git a/compose.yaml b/compose.yaml index ac702e9..15a7017 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,6 +1,15 @@ version: '3' services: + app: + build: + context: ./docker/php + volumes: + - .:/var/www + depends_on: + - database + networks: + - mirspay ###> doctrine/doctrine-bundle ### database: image: 'mysql:8.0' diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 0000000..cb277c1 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,15 @@ +FROM php:8.3-fpm + +RUN apt-get update && apt-get install -y --no-install-recommends \ + unzip \ + && rm -rf /var/lib/apt/lists/* + +RUN docker-php-ext-install pdo_mysql opcache bcmath + +# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser +ENV COMPOSER_ALLOW_SUPERUSER=1 + +COPY --from=composer /usr/bin/composer /usr/local/bin/composer + +COPY . /var/www +WORKDIR /var/www