Answer the question
In order to leave comments, you need to log in
Why is the site running through docker not working?
Created a starter project on laravel 7 version, installed via composer.
Created docker-compose.yaml
version: '3'
services:
#PHP Service
app:
build:
context: .
dockerfile: ./docker/php/Dockerfile
image: php:7.3-fpm
container_name: webinar_php
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./:/var/www
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/local.ini
#Nginx Service
webserver:
image: nginx:alpine
container_name: webinar_nginx
restart: unless-stopped
tty: true
ports:
- "7777:80"
volumes:
- ./:/var/www
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
#MySQL Service
db:
image: mysql:5.7.24
container_name: webinar_mysql
command: "--default-authentication-plugin=mysql_native_password"
restart: unless-stopped
tty: true
ports:
- "7776:3306"
environment:
MYSQL_DATABASE: laravel
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./docker/mysql/data:/var/lib/mysql/
- ./docker/mysql/conf/my.cnf:/etc/mysql/my.cnf
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: webimar_phpmyadmin
environment:
PMA_HOST: db
PMA_PORT: 3306
ports:
- 7760:80
Answer the question
In order to leave comments, you need to log in
Solved a problem.
I think the reason was that I had a version of php 8 installed locally on my computer.
And when I installed dependencies through the composer, this version was used.
Therefore, there was a problem
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.3.33. in /var/www/vendor/composer/platform_check.php on line 24
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question