Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

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'm trying to steer clear of Laradock.

Cheers,

0 likes
6 replies
GimmeMylanta's avatar

Hey @mvd, thanks for that ... Are you also running the frontend using VUE?

mvd's avatar

Yes, I run node js in Docker.

Example to run a NPM command:

docker-compose run npm <command>
GimmeMylanta's avatar

Nice. Do you need to run npm run dev to develop the vue stuff? or if I clone the repo, add laravel to the src directory, is that all i need to do?

mvd's avatar

Yes, if you want to change the Vue/Javascript you need to call npm run dev, but you need to do this in the Docker container

docker-compose run npm run dev

Please or to participate in this conversation.