Category : docker-compose

I get this error when trying to build a container ( in Laravel 7 project): executor failed running [/bin/sh -c docker-php-ext-install pdo mbstring pdo_mysql]: exit code: 1 This is Dockerfile: FROM php:7.4 RUN apt-get update -y && apt-get install -y openssl zip unzip git RUN curl -sS https://getcomposer.org/installer | php — –install-dir=/usr/local/bin –filename=composer RUN docker-php-ext-install ..

Read more

I have set a Docker environment for a Laravel project with Docker-compose on a Windows 10 machine: version: ‘3’ networks: laravel: services: nginx: image: nginx:stable-alpine container_name : nginx ports: – "8088:80" volumes: – ./src:/var/www/html – ./nginx/default.conf:/etc/nginx/conf.d/default.conf depends_on: – php – mysql networks: – laravel mysql: image : mysql:5.7.22 container_name: mysql restart: unless-stopped tty: true ports: ..

Read more

I have a problem with a project consisting of Frontend with Nuxt, and backend with Laravel. I created a docker-compose to manage everything on docker and traefik. This is my docker-compose version: "3" networks: web: external: true # traefik reverse proxy internal: external: false services: website: build: context: deployment/admin dockerfile: Dockerfile volumes: – ./admin:/var/www image: ..

Read more

After running docker-compose up -d –build followed by docker ps (to check images), the MySQL image doesn’t exist. When pinging my API endpoint, I get this error: SQLSTATE[HY000] [2002] No such file or directory (SQL: select count(*) as aggregate fro userswhereemail = [email protected]) The database credentials in the docker-compose.yml file match what’s inside the .env ..

Read more

I have a fresh Laravel 8 installation together with mysql:8.0 image. I want to add some configurations to MySql. This is my mysql service in the docker-compose.yml: mysql: image: ‘mysql:8.0’ ports: – ‘${FORWARD_DB_PORT:-3306}:3306’ environment: MYSQL_ROOT_PASSWORD: ‘${DB_PASSWORD}’ MYSQL_DATABASE: ‘${DB_DATABASE}’ MYSQL_USER: ‘${DB_USERNAME}’ MYSQL_PASSWORD: ‘${DB_PASSWORD}’ MYSQL_ALLOW_EMPTY_PASSWORD: ‘yes’ volumes: – ‘sailmysql:/var/lib/mysql’ networks: – sail healthcheck: test: ["CMD", "mysqladmin", "ping", ..

Read more

I am trying to make a unit test case for user registration. So I created test_user_registration for testing. public function test_user_registration(){ $this->withoutExceptionHandling(); $this->withoutMiddleware(); Bus::fake(); Sanctum::actingAs( User::factory()->create(), [‘*’] ); $response = $this->post(‘/api/users’,[ "firstName"=>"Kamal", "lastName"=>"Garu", "email"=>"[email protected]", "roleId"=>[4], "defaultRoleId"=>4, "investorId"=>[15], "defaultInvestorId"=>15, "streetAddress"=>"Jalur Banj", "postalCode"=>"977", "city"=>"bhaktapur", "countryId"=>160, "phone"=>9741801138, "status"=>1, "emailPortfolioReport"=>0, "emailInvestorActivities"=>0, "emailMarketUpdate"=>1, "isdCodeId"=>149, "roleType"=>["investorInternational"] ]); VerifyUser::dispatch($response); Bus::assertDispatched(VerifyUser::class); $response->assertStatus(200); } ..

Read more

I am facing a problem when I am trying to connect to mysql using docker. My docker-compose file version: ‘2’ services: app: build: context: ./docker/app dockerfile: Dockerfile image: ebdaa-m.test.com/app volumes: – .:/var/www/html ports: – "80:80" networks: – sdnet node: build: context: ./docker/node dockerfile: Dockerfile image: ebdaa-m.test.com/node volumes: – .:/var/www/html networks: – sdnet mysql: image: mariadb:10.5 ..

Read more

I faced with error when use mailcatcher with laravel ( "laravel/framework": "^8.54",) "message": "Connection could not be established with host localhost :stream_socket_client(): unable to connect to localhost:8003 (Cannot assign requested address)", "exception": "Swift_TransportException", "file": "/var/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php", "line": 261, So, I sent email like usual, I checked used default mail smpt config/mail.php ‘mailers’ => [ ‘smtp’ => ..

Read more

When running composer update it works until @php artisan package:discover I then got: In ProviderRepository.php line 208: Class ‘BarryvdhCorsServiceProvider’ not found Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1 I got BarryvdhCorsServiceProvider class defined in app.php So php artisan does not work at all. So what could be the problem? ..

Read more

This is using docker. It works when using wsl2 but when using hyper-v I’m getting the issue. I’m trying to run mix watch — –watch-options-poll=3000 or mix –production but every time I’m running it I’m getting the following issue: [webpack-cli] [Error: EEXIST: file already exists, open ‘/var/www/html/public/website/images/e-side.png’] { errno: -17, code: ‘EEXIST’, syscall: ‘open’, path: ..

Read more

I’m having a hard time connecting to the development webserver inside the container (from safari on my host machine). Since I am using network_mode: host I did not expect there to be any errors. In my .env APP_URL is set to localhost.com – I added an entry to /etc/hosts accordingly. Ping localhost.com referes to 127.0.0.1 ..

Read more