0

I have a docker-compose file for Laravel project. It consist from Postrges PHP 8 and Nginx. Contaienrs are running. So I tried to run composer install on PHP container and then php artisan migrate which throws me an error:

PDOException SQLSTATE[08006] [7] server does not support SSL, but SSL was required

Can somebody tell me please what am I dong wrong?

This is docker-compose.yml file

version: "3.1"
services:

  webserver:
    image: nginx:alpine
    container_name: simplaq-webserver
    working_dir: /application
    volumes:
        - .:/application
        - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
    ports:
     - "81:80"

  mysql:
    image: 'mysql:8.0'
    container_name: simplaq-mysql
    working_dir: /application
    volumes:
        - '.:/application'
    environment:
        - 'MYSQL_ROOT_PASSWORD=xxxxxxxxxx'
        - MYSQL_DATABASE=xxxx
        - MYSQL_USER=xxxxx
        - 'MYSQL_PASSWORD=xxxxxxx'
    ports:
        - '44002:3306'

  postgres:
    image: 'postgres:14.4'
    restart: always
    environment:
      POSTGRES_DB: 'pppppp'
      POSTGRES_PASSWORD: 'pppppppp'
      POSTGRES_USER: 'ppppppp'
    volumes:
        - ./phpdocker/postgres-data:/var/lib/postgresql/data
        - '.:/application'
    ports:
        - '5432:5432'

  php-fpm:
    build: phpdocker/php-fpm
    container_name: simplaq-php-fpm
    working_dir: /application
    volumes:
      - .:/application
      - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/8.0/fpm/conf.d/99-overrides.ini

and this is Laravel .env file with DB section|

DB_CONNECTION=pgsql
DB_HOST=postgres
DB_DATABASE=xxxx
DB_USERNAME=xxxx
DB_PASSWORD="xxxxx"
Čamo
  • 3,863
  • 13
  • 62
  • 114

0 Answers0