Skip to content
/ lamp Public

You can build lemp on docker container easily.

License

Notifications You must be signed in to change notification settings

ryo-kozin/lamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You can build lamp by just using docker-compose.

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.

A must

Docker

Structure

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

network name driver
app bridge

How to build lamp

  1. git clone https://github.com/ryo-kozin/lamp.git
  2. cd lamp
  3. 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;
  1. Finally open /lamp/apache/000-default.conf then chage the code.
  • From DocumentRoot /var/www/html/test/public to DocumentRoot /var/www/html/{project name}/public
  1. Access http://localhost, you can see the laravel project.

URL

localhost : http://localhost
phpmyadmin : http://localhost:8000

Tips

If you set some server name, you need to chage apache/000-default.conf. Add NameVirtualHost *:80 on the top in the file.

About

You can build lemp on docker container easily.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published