version: '3'
services:
nginx:
image: nginx:latest
volumes:
- ./:/var/www
- ./_docker/nginx/conf.d:/etc/nginx/conf.d
ports:
- 8876:80
depends_on:
- app
container_name: project_nginx
app:
build:
context: .
dockerfile: _docker/app/Dockerfile
volumes:
- ./:/var/www
depends_on:
- db
container_name: project_app
db:
image: mysql:8.0
restart: always
volumes:
- ./tmp/db:/var/lib/mysql
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: root
ports:
- 8101:3306
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
container_name: project_db
FROM php:8.0-fpm
RUN apt-get update && apt-get install -y \
apt-utils \
libpq-dev \
libpng-dev \
libzip-dev \
zip unzip \
git && \
docker-php-ext-install pdo_mysql && \
docker-php-ext-install bcmath && \
docker-php-ext-install gd && \
docker-php-ext-install zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
WORKDIR /var/www
ADD . /var/www
RUN chown -R www-data:www-data /var/www
COPY ./_docker/app/php.ini /usr/local/etc/php/conf.d/php.ini
# Install composer
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer \
--install-dir=/usr/local/bin
WORKDIR /var/www
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.28. in /var/www/vendor/composer/platform_check.php on line 24
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.0",
"barryvdh/laravel-debugbar": "^3.7",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.75",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.4"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"platform": {
"php": "^8.0"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
{
"config": {
"platform-check": false
}
}