Category : docker

Have been following this tutorial making a few changes when needed: https://medium.com/@pierangelo1982/dockerize-an-existing-laravel-application-with-docker-compose-a45eb7956cbd After running docker-composer build and docker-composer up all the migrations run successfully and I get a message saying the app is running on http://0.0.0.0:8000 Hover that url or the one specified in the tutorial show nothing. Here is my docker file FROM php:7 ..

Read more

Trying to setup a Laravel local dev environment on my Mac M1 using Docker. I followed the instructions on Laravels installation page, running curl -s "https://laravel.build/example-app" | bash And then ./vendor/bin/sail up Error log Building laravel.test [+] Building 2.6s (10/17) => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 37B 0.0s => ..

Read more

I work with Laravel in docker, I decided to connect mailtrap service for testing mail sending. But it does not work in docker, if you run the project not in docker, it sends mail as needed. Here are my docker compose files and laravel settings. My docker-compose.yml version: ‘3’ services: project-nginx: container_name: project-nginx build: context: ..

Read more

I cloned a repository and created a development environment with docker and nginx as a server. However, when running the composer install command I run into the following error: Error running composer install And in the browser: in browser I tried pkg install php7.4-session but im getting zsh: command not found: pkg Using nginx so ..

Read more

Currently I’m testing performance of my laravel application. I’ve found this repo and run the laravel JSON serialization test on cloud server (16vCPUs-32GB memory). The benchmark (running in the docker container) gives me about 5500 RPS. But when I copied the project from benchmark and run test localy it gives me only ~4200 RPS. I ..

Read more

I’ve rebooted my system and then run all my containers using the vendor/bin/sail up command, the only one that failed to reload was MySQL. The error is the following : ERROR: for mysql a bytes-like object is required, not ‘str’ Traceback (most recent call last): File "/usr/lib/python3/dist-packages/docker/api/client.py", line 261, in _raise_for_status response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line ..

Read more

How do I call a docker container within Laravel? I am using the following package to download PDFs https://packagist.org/packages/spatie/browsershot, I have an npm container which I am trying to use with this package. My site container doesn’t have node or npm installed which is why I need to use my npm container instead. Here is ..

Read more

I have a Laravel project working on docker. When I want to add a package with "composer require" this error occurs: Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 83886080 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 90 I have changed the memory_limit in php.ini to "-1". The same error continues. I have ..

Read more

I am new to docker for Windows and have this setup wherein 2 repos have its own docker-compose.yml file. One is for the API while the other is for the APP. API docker-compose.yml version: ‘3’ networks: my_network: name: my_network ipam: config: – subnet: 172.23.0.0/24 services: my_api: build: context: . dockerfile: .docker/site.dockerfile container_name: my_api ports: – ..

Read more

I am really having hard time trying to set mysql_1 container up and running. So, I installed Laravel 8 just by instructions, first downloaded Docker Desktop, set WSL properly and everything works fine except MySQL. I installed Laravel from Windows Terminal using: curl -s https://laravel.build/example-app | bash cd example-app ./vendor/bin/sail up Everything works fine (I ..

Read more

Why I cannot connect a laravel application to a redis on docker using the container name nor "localhost"? If i try to use the REDIS_HOST as cache i got the error: >>> IlluminateSupportFacadesRedis::connection()->ping(); PHP Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /mnt/c/Users/user/Documents/startup/meli/vendor/predis/predis/src/Connection/StreamConnection.php on line 127 PHP Warning: stream_socket_client(): unable to connect ..

Read more