Category : docker-compose

Currently I’m working on Nuxt js app that should connect to backend api made in Laravel. The problem is that every request that is sent to the api via axios fails with one of this errors(Depending on the API_URL I use): Error: connect ETIMEDOUT API_URL Error: connect ECONNREFUSED API_URL Example request: axios.get(process.env.API_URL + ‘api/something’) … ..

Read more

I use this source https://github.com/Jeroen-G/alpine-artisan for create local environment laravel 7.4 I run docker-compose up -d –build, and he return ERROR: yaml.scanner.ScannerError: mapping values are not allowed here in "./docker-compose.yml", line 11, column 18 My Dockerfile FROM jeroeng/alpine-artisan:web7.4 My docker-compose.yml services: app: build: . ports: – 80:80 volumes: – .:/www/html db: image: percona:5.7 environment: MYSQL_ROOT_PASSWORD: ..

Read more

Hi I am dockerising my laravel project but at the last stage I got an error while running below command sudo docker-compose up Below is the log for above command db_1 | Version: ‘5.7.33’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 MySQL Community Server (GPL) app_1 | app_1 | IlluminateDatabaseQueryException app_1 | app_1 | SQLSTATE[HY000] [2002] No such ..

Read more

I am working on a Laravel 6 application. I am using Docker as my development environment. I am trying to connecting to the database in the docker-compose configuring the variables in the .env file. But it is not working. This is my docker-compose.yaml file. version: ‘3’ services: app: container_name: coup_app build: context: . dockerfile: .docker/Dockerfile ..

Read more

I created my Laravel project with docker-compose. I created a database called fhblog in my local. When I enter the php container and run the php artisan migrate command, I get the following error. SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = fhblog and table_name = migrations and table_type = ‘BASE ..

Read more

I Set Up Laravel, Nginx, and MySQL with Docker Compose in order to deploy my laravel application. I want to set up the owner for the folder /var/www and try this in my dockerfile # Copy existing application directory permissions COPY –chown=www-data:www-data . /var/www RUN chmod -R 775 /var/www But that not set up the ..

Read more

I am trying to get Laravel 8 running as instructed here on Ubuntu. As a first step, I downloaded the laravel folder by curl -s https://laravel.build/example-app | bash. Then from within the folder example-app run ./vendor/bin/sail up. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e685d75b210a sail-8.0/app "start-container" 21 seconds ago Up 20 seconds 0.0.0.0:80->8000/tcp ..

Read more

I have a laravel api project with react SPA front-end. Folder structure: app … Dockerfile api … Dockerfile docker-compose.yml On laravel (api) .env DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=myapp DB_USERNAME=root DB_PASSWORD=secret On api (laravel) 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 ..

Read more

I have a laravel api project with react SPA front-end. Folder structure: app … Dockerfile api … Dockerfile docker-compose.yml On laravel (api) .env DB_CONNECTION=mysql DB_HOST=db DB_PORT=3306 DB_DATABASE=myapp DB_USERNAME=root DB_PASSWORD=secret On api (laravel) 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 ..

Read more

I Have watched approximately 23.74 docker-compose tutorials for laravel and mysql containers! Please can someone explain to me??? When I create my docker-compose file I create an mysql container from a mysql image. THEN I have to enter variables that look like this: environment: MYSQL_DATABASE: homestead MYSQL_USER: homestead MYSQL_PASSWORD: secret MYSQL_ROOT_PASSWORD: secret SERVICE_TAGS: dev SERVICE_NAME: ..

Read more

I am trying to containerize a Laravel application using Docker Compose, but I am failing to use a shared volume to bring in my actual project app files. My docker-compose file looks like this: version: "3.7" services: app: build: args: user: sam uid: 1000 context: ./ dockerfile: Dockerfile image: converter container_name: converter-app restart: unless-stopped working_dir: ..

Read more

I’m trying to connect my application (in Laravel) with rabbitMQ, but when trying, this error happens: [PhpAmqpLibExceptionAMQPIOException Error Connecting to server(99): Cannot assign requested address]: https://i.stack.imgur.com/wmLPo.png Here’s my docker-compose services: nginx: image: nginx:1.13 container_name: nginx volumes: – "./projects/publisher:/var/www/publisher" – "./projects/consumer:/var/www/consumer" – "./volumes/nginx/nginx.conf:/etc/nginx/nginx.conf" ports: – "8080:80" – "8081:81" depends_on: – php php: build: context: ./volumes/php container_name: ..

Read more

I’m trying to set up a development environment on my local machine which consists of caddy + PHP. docker-compose.yaml: version: ‘3’ services: app: build: context: . container_name: app restart: unless-stopped tty: true environment: SERVICE_NAME: app SERVICE_TAGS: dev volumes: – ./:/var/www – ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini webserver: image: caddy container_name: webserver restart: unless-stopped tty: true ports: – "80:80" – ..

Read more