diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..2f29a98 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,9 @@ +.git +.env +storage/logs/* +storage/framework/cache/* +storage/framework/sessions/* +storage/framework/views/* +bootstrap/cache/* +.phpunit.result.cache +vendor/* \ No newline at end of file diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..2dc1730 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,16 @@ +FROM dunglas/frankenphp:1.10-php8.4-bookworm + +RUN install-php-extensions \ + pdo_mysql \ + gd \ + intl \ + zip \ + opcache + +COPY . /app + +WORKDIR /app + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +RUN composer install --no-dev --optimize-autoloader \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 15b7bda..216f4c7 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -23,7 +23,9 @@ services: isop-backend: container_name: isop-backend - image: dunglas/frankenphp + build: + context: ../backend + dockerfile: Dockerfile restart: unless-stopped env_file: - ../backend/.env @@ -37,8 +39,6 @@ services: ports: - 443:443 - 443:443/udp - volumes: - - ../backend:/app depends_on: isop-database: condition: service_healthy