Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LEMP Docker environment for PHP applications (Symfony, Laravel, PHP-like)

License

NotificationsYou must be signed in to change notification settings

Josee9988/Docker-Skeleton-LEMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple docker environment that allows you to run applications such asSymfonyLaravel or any customPHP-like project.

ThisLEMP + composer stack also includesPhpMyAdmin to allow you to manipulate your data even easier.

It is also shipped withvim,nano,curl, and many more useful tools!

Symfony installation guide 🔥|Laravel installation guide 🚀

Check theWiki for further explanation.

Do you want to help us improve the environment or did you found a bug?Let us know.


Environment setup

  1. Clone the repository:

    git clone https://github.com/Josee9988/Docker-Skeleton-LEMP.git
  2. Go to the cloned project directory:

    cd Docker-Skeleton-LEMP
  3. Modify the .env environment variables as you please.

    ###> Docker-Skeleton-LEMP-Config ###MYSQL_DATABASE=skeletondbMYSQL_USER=devMYSQL_PASSWORD=1234MYSQL_ROOT_PASSWORD=rootHTTP_PORT=80PHPMYADMIN_PORT=9000MYSQL_PORT=3306APPLICATION_NAME=skeletonApp###> Docker-Skeleton-LEMP-Config ###
  4. Build and test the container is successfully working

    docker-compose up -d
    • When you are done, visit the test page on the following URL:http://localhostNOTE: If you change the 'HTTP_PORT' you will have to specify the port at the end of the URL.
    • Visit the PhpMyAdmin page at:http://localhost:9000 and log in: (root/root ordev/1234)
  5. Initialize your Symfony/Laravel/PHP app.

    • Copy the 'Docker-Skeleton-LEMP-Config' .env config to your clipboard to not lose your configuration.
    • Create/copy your newSymfony/Laravel/PHP files keeping the/docker/ directory and thedocker-compose.yaml file.
    • Add the 'Docker-Skeleton-LEMP-Config' .env config in your new .env file.

Default port settings

ServicePortPath
Nginx (Your App)80http://localhost
PhpMyAdmin9000http://localhost:9000
MySQL3306N/A

Connect with the terminal to run commands inside the container

If you want to run a specific composer or MySQL commands or any kind of command inside the container you can easily do it with:

NOTE: 'skeletonApp' is the default application name. If you change this value in the .env file make sure to run the commands with your own project name.

  • Access MySQL terminal.
dockerexec -it skeletonApp-mysql bash# to access MySQL CLI
  • Access composer, and your own project.
dockerexec -it skeletonApp-phpfpm bash# to run any other command inside the container

Project tree

.├── docker│   ├── Dockerfile│   ├── mysql│   │   └── mysql-data│   ├── nginx│   │   ├── default.conf│   │   └── logs│   └── php│       ├── logs│       └── php-ini-overrides.ini├── docker-compose.yaml├── LICENSE├── public│   ├── index.php│   └── README.md└── README.md

Restart (MySQL) settings/container

If you should your MySQL environment variables you will have to re-create the docker container.

  • Remove all the MySQL data

    sudo rm -rfv docker/mysql/mysql-data/&& mkdir -p docker/mysql/mysql-data
  • Recreate the container

    docker-compose up -d --build --force-recreate# will rebuild the container.
  • Then, you can restart you can re-run your app as normal.

    docker-compose up -d

Did you enjoy the environment? Help us raise these numbers up!

Github followersGithub starsGithub watchersGithub forks


⚠️Remember that this docker environment does not guarantee a 100% effectiveness as it is being tested yet,and may have some issue at some point.Use it at your own risk and always do backups of your code.⚠️

Made with a lot of ❤️❤️ by@Josee9988

Releases

No releases published

Sponsor this project

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp