Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

masterhunter's avatar

Laravel horizon in Docker

Recently i try to containerize my existing laravel project with docker. So far i able to build all necessary services for laravel such as mysql, redis, npm, composer and etc. Also it is displayed in browser and worked well too. But i found that no one discuss about how to use Horizon in docker. Anyone know that how to do so?

masterhunter's avatar
masterhunter's avatar StefanGhib...3yrs agoLaravel
3
1
Last reply by StefanGhiban 3yrs ago
andrewmung's avatar

localhost not working even though Docker shown running

Hi All, I am an new user of Laravel 8 and recently applied Docker for installation Docker-desktop shown example-apps of Laravel are running normally But open in browser of containers / apps of Docker triggered webpages of localhost for each application as belows: localhost: 6397 for redis shown : This page isn’t working 2.localhost: 3306 for mysql shown: This page isn’t worki

andrewmung's avatar
andrewmung's avatar andrewmung4yrs agoGeneral
2
1
Last reply by andrewmung 4yrs ago
Burano's avatar

Docker how to use service name in .env file?

I have 2 Docker containers spawned from 2 different docker-composer.yml files; container-1 (Laradock container with Laravel app) container-2 (container with rest api) I linked them both in the same network, but in my Laravel .env inside container-1, if I try and reference a service inside container-2 as a host var (to send requests to the API), it doesn't work. I checked wi

Burano's avatar
Burano's avatar bugsysha4yrs agoCode Review
1
1
Last reply by bugsysha 4yrs ago
shargr1's avatar

How to make a volume in a docker container to reflect laravel changes in real-time

I'm currently working on a docker dev env running ember on the frontend and laravel on the backend. I have the code volumed in, but any changes made to the code are not reflected until I rebuild the container using "docker-compose up --build." I've tried pointing the volume to a few different paths and haven't been able to get the code to update in real time. Is there

shargr1's avatar
shargr1's avatar shargr14yrs agoCode Review
2
1
Last reply by shargr1 4yrs ago
NikolayDimitrov's avatar

http://127.0.0.1:8001 does not load in browser (docker exec -it)

Good day. I am at this section: The Laravel Installer Or, you may install the Laravel Installer as a global Composer dependency: composer global require laravel/installer laravel new example-app cd example-app php artisan serve Make sure to place Composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exi

NikolayDimitrov's avatar
NikolayDimitrov's avatar NikolayDim...4yrs agoCode Review
0
7
KalimeroMK's avatar

Docker error enable modules

Hi i have problem with docker enable php modules my dockerfile FROM php:7.4-fpm-alpine RUN apk add icu-dev musl-dev zip libzip-dev freetype-dev libpng libpng-dev libjpeg-turbo-dev libxml2 libxslt-dev libwebp-dev zlib-dev libxpm-dev --no-cache \ coreutils \ php7-fpm \ php7-apcu \ php7-ctype \ php7-curl \ php7-dom \ php7-gd \ php7-iconv \ php7

KalimeroMK's avatar
KalimeroMK's avatar Sinnbeck4yrs agoGeneral
1
1
Last reply by Sinnbeck 4yrs ago
GodziLaravel's avatar

Docker: Failed to open stream: Permission denied

Hello , I try to configure a docker laravel app , when I try to run: docker-compose exec app php artisan key:generate it returns me permission error : UnexpectedValueException The stream or file "/var/www/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied at vendor/monolog/monolog/src/Monolog/Handler/StreamHa

GodziLaravel's avatar
GodziLaravel's avatar Sergiu174yrs agoServers
1
1
Last reply by Sergiu17 4yrs ago
PetroGromovo's avatar

Can I show mix success/error notifications of docker in hosting Kubuntu 20?

In my docker/laravel project (with hosting Kubuntu 20) I added support of mix success/error notifications FROM php:8.0.9-apache RUN apt-get update && \ ... libnotify-bin \ But anyway these notifications are not visaible in my OS. If there is a way to show notifications from my docker app my hosting Kubuntu 20 ? Thanks in advance!

PetroGromovo's avatar
PetroGromovo's avatar PetroGromo...4yrs agoGeneral
0
1
cerberuspup's avatar

Having issue running a test on docker

I'm using docker for my laravel and I'm trying to run php artisan test , but when I do I get this error could not translate host name "pgsql" to address: Temporary failure in name resolution (SQL: select tablename from pg_catalog.pg_tables where schemaname in ('public')) this is what I have in my .env APP_NAME=Laravel APP_ENV=local APP_KEY=base64:1SVdFc4F7c8IoufSvE/q

cerberuspup's avatar
cerberuspup's avatar Sinnbeck4yrs agoLaravel
16
1
Last reply by Sinnbeck 4yrs ago
aleraymann's avatar

Error Nginx using Laravel8 project on Docker (Windows 10)

good morning.. Im working with Docker on windows10, but i've a problem when i try access the routes; To access the route('/'), its working fine, but when i try access the route('/pannel') or other route, its returns a 500 error, and in docker logs, "*5 rewrite or internal redirection cycle while internally redirecting to...." I looked for a solution, to change the ng

aleraymann's avatar
aleraymann's avatar Sinnbeck4yrs agoLaravel
5
1
Last reply by Sinnbeck 4yrs ago
MohamedTammam's avatar

Docker is not running.

I installed Docker and enabled WSL2 on win10 version 20H2. When I try to run ./vendor/bin/sail up on Laravel project that I installed sail on, I get that message and nothing happens. Docker is not running. That's the result that I get when I run wsl --list -v NAME STATE VERSION * docker-desktop-data Running 2 docker-desktop Run

MohamedTammam's avatar
MohamedTammam's avatar MohamedTam...4yrs agoLaravel
4
1
Last reply by MohamedTammam 4yrs ago
mstdmstd's avatar

Docker failed with [Makefile:192: imagick_file.lo] Error 127

I try to install php in docker of w2orking project with header in Dockerfile : FROM composer:1 AS composer FROM php:7.4-fpm-alpine COPY --from=composer /usr/bin/composer /usr/bin/composer ENV PHPIZE_DEPS \ build-base \ ... I got errors building the project with error below the output: docker-compose up -d --build ... checking if cc PIC flag -fPIC works... yes checking if cc st

mstdmstd's avatar
mstdmstd's avatar mstdmstd4yrs agoGeneral
1
1
Last reply by mstdmstd 4yrs ago
rhys's avatar

Image upload production docker

Hi I have recently deployed a basic website using docker. For production I have decided to turn off volumes to improve speed but I think it has caused a knock on affect to an image uploader.(I think this is the cause) On development I have a vue.js image uploader that saves files to public/images this works great. However when deployed to production I'm getting message: "C

rhys's avatar
rhys's avatar rhys4yrs agoServers
4
1
Last reply by rhys 4yrs ago
Daniel-Pablo's avatar

mysql container Docker Is diying each time I migrate

Hi I am trying to migrate with Sail sail artisan migrate and each time I call the command the docker MySQL container DIE HELP here thanks in advance am in production on a server inside digital ocean Also, any call to migrate is like ages - take really long time to see what's going on a LOT even to see an error going on...

Daniel-Pablo's avatar
Daniel-Pablo's avatar Arius Tigg...4yrs agoServers
2
1
Last reply by Arius Tigger 4yrs ago
diazfarindra's avatar

connecting MySQL server from outside docker container with Laravel inside docker container

hello, I'm just learning laravel sail, and found something I don't understand. i have mysql installed in wsl2 ubuntu, and everything is configured properly, mysql in wsl can connect to tableplus which is based on my windows. but i can't connect it with my laravel which is in docker container. i have tried every solution on the internet, but i don't find any similar with my case

diazfarindra's avatar
diazfarindra's avatar diazfarind...4yrs agoLaravel
4
43
Last reply by diazfarindra 4yrs ago
russellxu's avatar

Docker + Mix + Browsersync + InertiaJs

I'm working on a project using InertiaJs. npm watch is fine at most of the time.But soon I realize it cant hot reload the page, I have to press F5 to refresh the page whenever mix is done complie. Then I found Browersync. I followed the instructions , installed Browsersync and rerun npm watch. Browsersync opened a localhost:3000 for me. But I dont think this should work,because

russellxu's avatar
russellxu's avatar russellxu4yrs agoInertia
1
1
Last reply by russellxu 4yrs ago
bobwurtz's avatar

Github Action for Docker Runtime

Does anyone know how to use a Github action to deploy a Vapor application when pushing a new commit? I had it configured correctly when I was using one of the native runtimes. I had to switch to a Docker runtime because I needed a specific PHP extension. Now my commits are no longer deployed. My old action looked like: name: Deploy to Staging on: push: branches: [ stagin

bobwurtz's avatar
bobwurtz's avatar imrodrigoa...4yrs agoVapor
1
1
Last reply by imrodrigoalves 4yrs ago
alex_storm's avatar

How to build docker image for gitlab container registry?

Hello! I creating application with gitlab package registry(dockerhub but local in gitlab). I created my docker image for laravel only for testins env and next step deploy my app to servers. But. when I testing deployment jobs I get error: Composer could not find a composer.json file in /builds/ Docker image for testing: FROM php:8-fpm-alpine WORKDIR /var/www RUN apk upd

alex_storm's avatar
alex_storm's avatar alex_storm4yrs agoLaravel
7
1
Last reply by alex_storm 4yrs ago
browlciba's avatar

Deploying Laravel Mix using Docker?

I'm currently trying to move an existing Laravel app onto Docker containers using docker-compose. All good so far, except I'm stuck on how to run the npm install and npm run mix steps. I've got a node.js image and I think I should just have to mount the application root directory as a bind-mount, run the npm scripts, and then the built files should be dumped into the applicatio

browlciba's avatar
browlciba's avatar browlciba4yrs agoFeedback
2
1
Last reply by browlciba 4yrs ago
diepaul's avatar

Sail - Docker - 2 seperate database containers

I'm trying to setup a seperate database for Laravel Telescope using Sail. In the docker-composer.yml file I added a second mysql container using another port (3307). The container and the database is working fine, using DataGrip I can access it with no problems. Still Laravel will throw a QueryException when using the new database connection: SQLSTATE[HY000] [2002] Connection r

diepaul's avatar
diepaul's avatar diepaul4yrs agoGeneral
0
1
aylara's avatar

Securing docker deployment of Larevel apps in production from internal compromise

In the docker-compose file, database creds are stored in the clear. So also all the Laravel related creds in the .env file This is perfectly fine when I’m hosting the solution and in control of the servers. My use case however is to deploy the solution within the customer’s infrastructure and there is the risk someone uses these to compromise or start reverse engineering the sy

aylara's avatar
aylara's avatar aylara4yrs agoGeneral
2
1
Last reply by aylara 4yrs ago
PetroGromovo's avatar

I got [Errno 13] Permission denied: './docker-compose.yml' running docker

I installed docker on kubuntu 18 , but I got error $ docker-compose up -d --build ERROR: .PermissionError: [Errno 13] Permission denied: './docker-compose.yml' Reading branch https://stackoverflow.com/questions/60025430/docker-error-ioerror-errno-13-permission-denied-docker-compose-yml I tried to salve it : username@ubuntuOS:/ProjectPath/DOCKER$ sudo groupadd docker [sudo] pas

PetroGromovo's avatar
PetroGromovo's avatar PetroGromo...4yrs agoGeneral
0
1
rlsteelman's avatar

Mac BigSur -> Docker -> sail up -> laravel.test Error

I just downloaded Docker Desktop for Mac and am able to confirm the installation using the getting-started container. I then follow the instructions for downloading the build file using curl and letting it install the laravel directory. From there, I run the vendor/bin/sail up command. Everything starts Pulling except laravel.test, which comes back in red as: laravel.test er

rlsteelman's avatar
rlsteelman's avatar rlsteelman4yrs agoLaravel
4
1
Last reply by rlsteelman 4yrs ago
warpig's avatar

Using a Docker Utility Script and Azuracast in Laravel project

Is it possible to do the following on a Laravel project? The installation process for Azuracast has a utility script which is only available through Docker, so docker compose is needed in order to run and install this service, im asking, is it possible to utilize this script and install Azuracast, im using Heroku as my host and I've no clue if Heroku actually supports it, has a

warpig's avatar
warpig's avatar warpig4yrs agoLaravel
1
1
Last reply by warpig 4yrs ago
AIB's avatar

how to run "php artisan make:migration" with docker and vsc?

I'm so new to docker I wanted to run normal php artisan command in vsc teminal but it didn't work, I figured that I have to run this command in the "docker console" so how do I access docker console in visual studio code?

AIB's avatar
AIB's avatar frankielee4yrs agoLaravel
1
1
Last reply by frankielee 4yrs ago
dlopez079@gmail.com's avatar

Sail / Docker Nightmare

I am trying my absolute best to work with Laravel/Sail/Docker but it is just not working out for me. I have experienced more frustration than I have completed work. I have finally come across a hurdle that I just can't get by. I have to put this Laravel framework down for now and hope that my frustration can let me concentrate and get back into creating again. For starters.

dlopez079@gmail.com's avatar
dlopez079@gmail.com's avatar dlopez0794yrs agoLaravel
10
1
Last reply by dlopez079 4yrs ago
ivan2nn's avatar

docker laravel run composer after containers have started

I asked a question few days ago about preparing a laravel project in Docker with postgresql (https://laracasts.com/discuss/channels/laravel/docker-laravelpostgresql-translation-to-hostname) Everything worked well (thanks to the answer I get). The yaml file is this one: version: '3' services: nginx: image: nginx:stable-alpine container_name: nginx ports: -

ivan2nn's avatar
ivan2nn's avatar gabbyTI4yrs agoLaravel
6
1
Last reply by gabbyTI 4yrs ago
blake.thompson's avatar

spatie/laravel-ray doesn't work with laravel sail from docker container

I've been fighting for a while now trying to get spatie/laravel-ray to work with a regular laravel sail app. After lots of debugging, I finally found that when ray was trying to talk to my host machine from the container, it was getting an error, "Could not resolve host: host.docker.internal". laravel-ray's documents say that you must add extra_hosts to the docker-com

blake.thompson's avatar
blake.thompson's avatar TheAnswerI...2yrs agoLaravel
7
1
Last reply by TheAnswerIsAlwaysMaybe 2yrs ago
nestoracevedo's avatar

Laravel 6 - CSRF token mismatch in Docker

I basically have a problem with the token in a L6 app. Currently the development site works fine on my machine. All forms work fine, I can login / logout and so on. Now I have moved the site to a development machine where Docker is managed. The site opens, connects to the database, and displays the login form. The problem is that every time you try to log in, when you click the

nestoracevedo's avatar
nestoracevedo's avatar sagar96371yr agoLaravel
5
1
Last reply by sagar9637 1yr ago
ivan2nn's avatar

Docker Laravel+Postgresql translation to hostname

I am approaching for the first time the Docker universe. I have this 3 years old working Laravel App (5.2), connected to a Psotgresql db. The asked some modifications and to bring it to an internal server of their own. I cannot adapt it to a new Laravel version yet, so I thought it would have been a good idea to deploy in container the 5.2 app in case other people need to work

ivan2nn's avatar
ivan2nn's avatar yogeshgala...3yrs agoLaravel
7
2
Last reply by yogeshgalav 3yrs ago
goootlib's avatar

Laravel installation with Docker on Windows Home

Hi everybody ! I am trying to install Laravel in development environment on my Windows Home machine with Docker and Sail. I have installed Doker Desktop and WSL2 as described in Laravel manual. But when I try to perform the following command in cli: curl -s https://laravel.build/example-app | bash I am getting one single message: "Docker is not running." And nothing h

goootlib's avatar
goootlib's avatar goootlib5yrs agoLaravel
0
1
mofiroz's avatar

install laravel octane roadrunner using docker

I want to install and run laravel octane roadrunner using docker. Necessary environment that is needed to build docker container is setup like docker desktop, wsl 2 layer, php 8. OS is windows 10. I have made docker file and compose file as well but docker desktop log says: There are no commands defined in the "octane" namespace

mofiroz's avatar
mofiroz's avatar armandojrn3yrs agoLaravel
1
1
Last reply by armandojrn 3yrs ago
davekaplan's avatar

Docker mysql port and Laravel's env DB_PORT

I'm using Docker on my Mac. If I bring up the mysql container and map 33060 to 3306. I'm getting a little lost about the msyql port configs. I'm new to Docker and Laravel too. Should the Laravel .env DB_PORT get 3306 and not the Docker 33060? Is mysql's port on the host always 3306? I've tested this a bunch of times and it seems like I get the SQLSTATE[HY000] [2002] Connection

davekaplan's avatar
davekaplan's avatar tykus5yrs agoLaravel
1
1
Last reply by tykus 5yrs ago
tangramor's avatar

Nginx + php8-fpm + nodejs docker image for Laravel 8/9/10/11 dev & deployment

https://hub.docker.com/r/tangramor/nginx-php8-fpm If this image helped you, do not skimp on giving a star to it! Based on php:8.5.1-fpm-alpine3.23, node:25.2.1-alpine3.23 (nodejs is not included in most of other nginx-php images...but needed by a lot of php frameworks), with nginx:alpine and richarvey/nginx-php-fpm's Docker script Since php8.4.1_node23.3.0, PHP brotli module i

tangramor's avatar
tangramor's avatar tangramor3yrs agoTips
7
1,416
Last reply by tangramor 3yrs ago
nrobates's avatar

Laravel Octane Watcher Issue on Docker Container

Hello! I am running a docker container through docker-compose and on start up the container runs the following: php artisan octane:start --host=0.0.0.0 --watch. This works great and I see: INFO Server running… Local: http://0.0.0.0:8000 Press Ctrl+C to stop the server Unfortunately anytime a change happens and the watcher detects the change I get the message Applicatio

nrobates's avatar
nrobates's avatar nrobates3yrs agoLaravel
6
1
Last reply by nrobates 3yrs ago
atthakasem's avatar

Deploying local Laravel 8 project installed via Docker

Hi, since Laravel 8 the recommended way to create a new Laravel project is to use Docker according to the official doc: https://laravel.com/docs/8.x/installation I'm not very familiar with Docker and was wondering if this new method was solely introduced to ease setting up the local environment or if in addition it helps with deploying the project as a containerized app (as opp

atthakasem's avatar
atthakasem's avatar automica5yrs agoLaravel
1
1
Last reply by automica 5yrs ago
dniccum's avatar

Laravel Mix 5.X production build error in Docker container

I am currently encountering an error during the production build process within a Docker container that I cannot explain. The logs are extremely ambiguous and don't' necessarily say what is going on. This is what I am seeing: [webpack.Progress] 92% chunk asset optimization [webpack.Progress] 92% chunk asset optimization TerserPlugin npm ERR! code ELIFECYCLEnpm ERR! errno 1 npm

dniccum's avatar
dniccum's avatar danilo0001...3yrs agoMix
1
1
Last reply by danilo00010 3yrs ago
krepanakrava's avatar

docker: invalid reference format: repository name must be lowercase.

When trying to create a new Laravel project on Windows 10 in WSL 2 Ubuntu using Docker (following Laravel Getting started -> Installation tutorial), I've been getting this error: "docker: invalid reference format: repository name must be lowercase." I found out why I've been getting this error, it's because my Windows username contains 2 words (space) and has upper

krepanakrava's avatar
krepanakrava's avatar krepanakra...5yrs agoTips
0
1
TonksM's avatar

Class "YamlFrontMatter" Not Found - Laravel, Docker, Composer

Recently, I've been following the "Laravel 8 From Scratch" Laracast, and chose to install Laravel using the Bash script installer method and running Laravel in a Docker container. I was happily following along until the instructor asked us to install YamlFrontMatter using Composer. I opened the CLI for [project-name]_laravel.test_1, and ran the command: composer requi

TonksM's avatar
TonksM's avatar gBhatt19982yrs agoLaravel
12
1
Last reply by gBhatt1998 2yrs ago
Haseeb69's avatar

issues with docker compose

im dockerizing my laravel app i build my image using sudo docker build -t werifier . command here's my docker file FROM php:7.4-cli WORKDIR /var/www/html RUN apt-get update RUN apt-get install -y git RUN git clone *my project url here* WORKDIR /var/www/html/werifier-frontend/ RUN chmod 777 -R ./storage && chmod 777 -R ./bootstrap/cache && chmod 777 -R ./publ

Haseeb69's avatar
Haseeb69's avatar Haseeb695yrs agoLaravel
0
1
GimmeMylanta's avatar

Laravel & Vue docker setup

Hey All, I am building a Laravel site using Vue as the frontend which is served from the resources directory (not a seperate vue project) and i am having issues trying to find a decent docker-compose / dockerfile setup which runs everything from the containers so i don't need anything locally except for Docker. Does anyone have anything like this setup that they could share? I'

GimmeMylanta's avatar
GimmeMylanta's avatar Chris19815yrs agoLaravel
6
1
Last reply by Chris1981 5yrs ago
GodziLaravel's avatar

Docker: what directories / files can I put in .gitignore

Hello , I cretaed a fresh docker laravel project, I'm wondering what directrories and files I can put them in .gitingore ? git status On branch 8.x Your branch is ahead of 'origin/8.x' by 1 commit. (use "git push" to publish your local commits) Untracked files: (use "git add <file>..." to include in what will be committed) .idea/ c

GodziLaravel's avatar
GodziLaravel's avatar GodziLarav...5yrs agoGeneral
0
1
Haseeb69's avatar

laravel sail up command inside docker file

im trying to dockerize my laravel app i know about laravel sail and stuff but im trying to run laravel sail command from inside docker file FROM php:7.4-cli WORKDIR /home/ RUN apt-get update RUN apt-get install -y git RUN git clone #myprojecturl WORKDIR /home/#myprojectnamehere/ RUN apt update && apt upgrade RUN apt install curl RUN curl -sS https://getcomposer.org/in

Haseeb69's avatar
Haseeb69's avatar Haseeb695yrs agoLaravel
2
1
Last reply by Haseeb69 5yrs ago
Haseeb69's avatar

sql errors on laravel docker

i wanted to dockerize my laravel app. However laravel sail does not explain in any way how to configure your database after running migrations . Anways i gave up on sail as followed some tutorials i launched two containers of mysql and php like this sudo docker pull mysql/mysql-server:latest sudo docker run --name=mysql -e MYSQL_ROOT_PASSWORD=mypass -d mysql/mysql-server:lates

Haseeb69's avatar
Haseeb69's avatar Haseeb695yrs agoLaravel
5
1
Last reply by Haseeb69 5yrs ago
trogne's avatar

WSL and Docker - strange folder name (Laravel Sail)

I'm using Laravel Sail for Laravel installation on Windows. For WSL, I use the distribution Ubuntu-20.04. After I enter Ubuntu, with wsl -d Ubuntu-20.04, I'm on the path "/mnt/d/htdocs/laracasts/". But Docker Desktop, after started, changes the path drastically : "/mnt/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/5db8e096e96dcde99007566869902027a09524bd8527abe745a

trogne's avatar
trogne's avatar trogne5yrs agoGeneral
1
1
Last reply by trogne 5yrs ago
UhOh's avatar

How to: Docker Remote Container & Sail?

Anyone know how to set-up Docker Remote Container & Sail? The issue seems to be that Sail containers need to be started with sail up in order for WWWGROUP to be set properly, otherwise you get errors. Not quite sure how to edit devcontainer.json to do this. Tnx

UhOh's avatar
UhOh's avatar UhOh5yrs agoLaravel
0
1
uniqueginun's avatar

Docker run two Laravel Projects

Hello everyone, I'm new to docker and I set up docker for two projects in my local machine. the first project is a website that consumes the second project which is Laravel API. docker-compose.yml nginx setup for the website project services: nginx: image: nginx:stable-alpine ports: - "80:80" docker-compose.yml nginx setup for the API

uniqueginun's avatar
uniqueginun's avatar jroemanecl...2yrs agoGeneral
3
6
Last reply by jroemaneclang 2yrs ago
MaverickChan's avatar

Install Through Docker Failed. Says: "docker: invalid reference format."

Got a new machine and decide to install Laravel through Docker on Mac. running curl -s https://laravel.build/newApp | bash always get a message : docker: invalid reference format. Why ? macOS Big Sur 11.2.2 fresh new Anyone has this problem either?

MaverickChan's avatar
MaverickChan's avatar samwarnick5yrs agoGeneral
2
1
Last reply by samwarnick 5yrs ago
pirmax's avatar

Laravel Docker Hosting

Hello, I am looking to deploy my Laravel 8 application (with Docker, and Sail to develop it locally) for a lower cost and high performance (French server if possible). I don't know much about Docker, but I imagine pushing my code from GitLab when the code is available in master. I don't want to use an app like Vapor because it uses AWS, I would like a full package (hosting + do

pirmax's avatar
pirmax's avatar bugsysha5yrs agoGeneral
1
1
Last reply by bugsysha 5yrs ago
Lena's avatar

Changing value of DB_HOST in .env - Docker environment

I run my project using Laravel 8 and Docker. When I am inside Docker container and run DB related artisan commands I must update my .env file with this: DB_HOST=mysql (service name from docker-compose.yml) If I leave it like that I will get error trying to access website on 127.0.0.0.1:8000 and to fix it I need to go back again to .env and change DB_HOST to: DB_HOST=127.0.0.1

Lena's avatar
Lena's avatar sr575yrs agoLaravel
3
3
Last reply by sr57 5yrs ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.