From 8b9b4cbb68f7effb983cb98a4fbe78d1fdbf4e93 Mon Sep 17 00:00:00 2001 From: Oleksii Skorobogatko Date: Sat, 7 Sep 2024 13:00:33 +0300 Subject: [PATCH] #1 app (php) docker --- compose.yaml | 9 +++++++++ docker/php/Dockerfile | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 docker/php/Dockerfile 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