A ready to use docker-compose configuration with php, mysql, nginx.
Containers:
- PHP 8.0
- nginx
- MySQL 5.7
- phpmyadmin
git clone https://github.com/stdakov/docker-lamp-simple.git
cd docker-lamp-simple/
git pull
docker-compose up -dWait some minutes and the containers are ready to go.
To confirm that everything is running fine go to http://localhost.
http://localhost:8080
- username: app_user
- password: password
If you want to change some container configuration you need to rebuild the container:
docker-compose up -d --no-deps --build {service-name}docker-compose up -d --no-deps --build phpmyadmindocker-compose up --build -ddocker-compose exec {service-name} bashdocker-compose exec app bashdocker-compose exec app ls -ldocker-compose exec app composer installdocker-compose exec app php artisan key:generatedocker-compose exec db /usr/bin/mysqldump -u root --password=password app > backup.sqldocker-compose logs nginxdocker-compose restartdocker-compose stopdocker-compose down -v