Skip to content

Latest commit

 

History

History
94 lines (65 loc) · 1.38 KB

README.md

File metadata and controls

94 lines (65 loc) · 1.38 KB

docker-lamp-simple

A ready to use docker-compose configuration with php, mysql, nginx.

Containers:

  • PHP 8.0
  • nginx
  • MySQL 5.7
  • phpmyadmin

Installation

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.

phpmyadmin

http://localhost:8080

  • username: app_user
  • password: password

Update container configuration

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

Connect to container:

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

Restart everything:

docker-compose restart

Stop everything:

docker-compose stop

Remove everything:

docker-compose down -v