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 -d
Wait 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 phpmyadmin
docker-compose up --build -d
docker-compose exec {service-name} bash
docker-compose exec app bash
docker-compose exec app ls -l
docker-compose exec app composer install
docker-compose exec app php artisan key:generate
docker-compose exec db /usr/bin/mysqldump -u root --password=password app > backup.sql
docker-compose logs nginx
docker-compose restart
docker-compose stop
docker-compose down -v