Category : docker

I am trying to run Laravel using Docker locally. Everything works fine expect the database. This is how my docker-compose looks like: db: image: mysql:8.0 container_name: my-db environment: MYSQL_DATABASE: ${DB_DATABASE} MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} SERVICE_TAGS: dev SERVICE_NAME: mysql ports: – 3307:3306 volumes: – ./docker/mysql:/docker-entrypoint-initdb.d networks: – my-network My .env file looks like this: DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=laravel ..

Read more

I run larvae 8 sail he work fine my file content is docker-compose.yml # For more information: https://laravel.com/docs/sail version: ‘3’ services: rami.dev: build: context: ./vendor/laravel/sail/runtimes/8.0 dockerfile: Dockerfile args: WWWGROUP: ‘${WWWGROUP}’ image: sail-8.0/app ports: – ‘${APP_PORT:-80}:80’ environment: WWWUSER: ‘${WWWUSER}’ LARAVEL_SAIL: 1 volumes: – ‘.:/var/www/html’ networks: – sail depends_on: – mariadb mariadb: image: ‘mariadb:10’ ports: – ‘${FORWARD_DB_PORT:-3306}:3306’ ..

Read more

I have docker-compose.yml file version: ‘3’ services: #PHP Service app: build: context: . dockerfile: Dockerfile image: pamo/php container_name: app restart: unless-stopped tty: true working_dir: /var/www extra_hosts: – "host.docker.internal:host-gateway" volumes: – ./:/var/www networks: – app-network #Nginx Service webserver: image: nginx:alpine container_name: webserver restart: unless-stopped tty: true ports: – "80:80" – "443:443" volumes: – ./:/var/www – .docker/nginx-conf.d/:/etc/nginx/conf.d/ ..

Read more

I’m trying to deploy a Laravel project with apache using Docker to Cloud Run, everything is ok, i am deploying my project successfuly to Cloud Run without any problem, but when i add a supervisord and try to deploy my project again, i recieve this error: Container failed to start. Failed to start and then ..

Read more

Getting below error while running docker-compose up in Laravel project executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv –homedir ~/.gnupg –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys E5267A6C ..

Read more

The website is dockerized and is located at /var/www/ where the web directory is /var/www/html. The issue is when I enter my_domain.com/storage/user/ifconfig.png, I get error 404 while if I enter my_domain.com/storage/user/info.php, it works fine. I also moved info.php one and two directories back and the URL was working fine my_domain.com/storage/info.php. I checked the ownership and ..

Read more

I’m running PHPUnit tests in a Laravel 8 app and running into a problem with loading environment variables in the right order. Currently running in docker-compose, and the container configuration contains this: env_file: – local.env and local.env contains APP_ENV=local In phpunit.xml: <env name="APP_ENV" value="testing" force="true"/> However, in the test I get the following: $_ENV[‘APP_ENV’] => ..

Read more

I’m doing a laravel project using docker on php 7.3. But when I installed laravel/passport my docker container exits with code 255 with this error when I try to type docker-compose up: Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.29. in /app/vendor/composer/platform_check.php ..

Read more

I have setup my Laravel application using Laravel Sail (Docker based). Everything’s working fine except the MySQL. MySQL server is behaving differently for web (local.mysite.com:8080) and for CLI (ex: php artisan migrate). Configruation (1) If I use the following configuration in my .env file, … APP_DOMAIN=local.mysite.com … DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=mydb DB_USERNAME=root DB_PASSWORD=root FORWARD_DB_PORT=3307 the ..

Read more

Docker Response Time Does anyone have any idea why response time takes up to 1500 ms when using docker ? While when I run in my local machine it’s only ~200 ms which’s reasonable my docker-compose.yml file version: "3.4" networks: backend: driver: bridge services: mysql: image: mysql:8.0 container_name: mysql restart: unless-stopped ports: – 3307:3306 environment: ..

Read more

I am trying to setup a new Laravel project on MAC Big Sur [with sailup/docker], but i am getting the following error. The laravel.test build fails. I am following all the step by step instruction for MAC Installation from: https://laravel.com/docs/8.x/installation#getting-started-on-macos Please help. #7 293.9 Get:127 http://archive.ubuntu.com/ubuntu hirsute/universe amd64 gosu amd64 1.12-1build1 [745 kB] #7 295.9 ..

Read more

There are a lot of articles about this, I read them but none of the solutions worked. I have laravel mounted via docker-compose in the folder /var/www/html/app I am using this docker image https://github.com/khromov/alpine-nginx-php8/blob/master/Dockerfile Logged into the container as root user with docker-compose exec -u root web sh, I can gave 777 permission to all ..

Read more

I created a laravel sail project with PostgreSQL then I tried to connect with the server I got this error message FATAL: password authentication failed for user "sail" This is my docker-compose.yml pgsql: image: ‘postgres:13’ ports: – ‘${FORWARD_DB_PORT:-5432}:5432’ environment: PGPASSWORD: ‘${DB_PASSWORD:-secret}’ POSTGRES_DB: ‘${DB_DATABASE}’ POSTGRES_USER: ‘${DB_USERNAME}’ POSTGRES_PASSWORD: ‘${DB_PASSWORD:-secret}’ volumes: – ‘sailpgsql:/var/lib/postgresql/data’ networks: – sail healthcheck: test: ..

Read more

My code needs to make a local curl call and connect to another container that is being configured with /etc/hosts in the domain of the call. But I’ve already put the ips addresses of the > host.docker.internal > 127.0.0.1 > ip wsl2 > ip docker inspect And none of these connected, however when I put ..

Read more

I used Docker and this is my config file. COPY ./workers/conf.d /etc/supervisor/conf.d/ COPY /workers/supervisord.conf /etc/supervisord.conf RUN supervisord -n -c /etc/supervisord.conf and this is my env file … BROADCAST_DRIVER=log CACHE_DRIVER=redis QUEUE_CONNECTION=database SESSION_DRIVER=redis SESSION_LIFETIME=120 REDIS_HOST=redis // service name in docker REDIS_PASSWORD=null REDIS_PORT=6379 While my driver is a database, the supervisor wants Redis. 2021-07-06 07:30:05,150 INFO gave up: ..

Read more