If you are the person who is looking for the way to create lamp server quickly, this repository is for you!!!!
Here is the link for lemp.
Docker
container name | image | function |
---|---|---|
laravel-app | php-apache | apache, php |
laravel-db | mariadb | database |
laravel-phpmyadmin | phpmyadmin | phpmyadmin |
#php-apache (this image will be created by a Dockerfile in your docker images)
#You don't need use laravel in this local host, names of these containers include laravel though.
network name | driver |
---|---|
app | bridge |
git clone https://github.com/ryo-kozin/lamp.git
cd lamp
docker-compose up -d
If you create a laravel project, keep following the commands below.
4. docker-compose exec app bash
5. composer create-project laravel/laravel {project name}
6. exit
7. open .env file in the project
8. Change the infomation.DB_HOST = db, DB_DATABASE = user_system, DB_PASSWORD = root
- You can create a new database to excute commands below.
docker-compose exec db bash
mysql -uroot -p
root
create database {database name};
exit;
- Finally open /lamp/apache/000-default.conf then chage the code.
- From
DocumentRoot /var/www/html/test/public
toDocumentRoot /var/www/html/{project name}/public
- Access http://localhost, you can see the laravel project.
localhost : http://localhost
phpmyadmin : http://localhost:8000
If you set some server name, you need to chage apache/000-default.conf. Add NameVirtualHost *:80 on the top in the file.