How to run your PHP app in docker with MySql

preview_player
Показать описание
Docker is an amazing tool for containerization. It can be used to easily run your application with desired versions and desired services.

In this video I will take my PHP MVC Framework which I built before on this channel
and run it with docker.

🐳 Setup fully functional Docker environment on Windows

See how I build PHP MVC Framework

Table of Contents
----------------------------
00:00 - Intro & Overview
01:17 - Create Dockerfile
02:58 - Create Apache virtual host file
03:34 - Create composer installer
06:07 - Build an image with Dockerfile
07:02 - Run docker image
08:35 - Run commands in container
12:03 - Stop container
12:28 - Start container stack
14:15 - Execute command using docker-compose
15:15 - Run migrations in container
15:39 - Connect to the database with MySql client
16:44 - Create MySql config file
17:54 - Bind mysql-data volume to avoid data lost
20:25 - The End

Follow me on social media:

Check my Github:
Рекомендации по теме
Комментарии
Автор

such a useful guide man, thumbs up! i got my project working in 1hour and now i don't need to always update the code on my vps server for developing a fronted, huge props to you!

Vlabalala
Автор

Well, that is just some quality content. Easy follow through and working. I love it (after several hours of reading documentation this is heaven).

adamolecky
Автор

It is interesting to start building your framework

beticohernandez
Автор

Wow just awesome, I just started to work for a company and they required me to quickly grasp and dominate docker, but in addition I need to fully comprehend laravel migrations, composer and mysql all in a dockrized file... if you could do tutorial on all thia man, right here you have a fan forever... I love the way you teach

CesarRodriguez-nblm
Автор

Thank you so much, keep up the good work

AbdelghaniGUILIGHE
Автор

Great video. It would be cool if you did a video on moving your container to a Google Cloud VM

rpbale
Автор

Just noting at the 9 minute mark that because the composer.json is not in the container, I was unable to install composer without first copying the composer.json contents from your github site to there. I had to also install vim in order to create the file there because I'm a n00b and couldn't figure out how to move the file there directly. Not even sure if I should need to move the composer.json to the /var/www file, but that's what I ended up doing to move forward.

globalruckus
Автор

0:40 I changed windows for a moment and got scared by Olaf's voice. wth😂😂😂😂

devvvolf
Автор

Sir..! Could you make a video yii2 RBAC step by step.

jacklamarny
Автор

Can you make docker linux setup video !

devanochi
Автор

Can someone please help me, I have got this error:
Connection failed: SQLSTATE[HY000] [2002] Connection refused

Saboor-Hamedi
Автор

ამის მერე ვისზე ნაკლებიღა იქნება ჩვენი frameworkი?!

vaja
welcome to shbcf.ru