https://github.com/cakebake/docker-lnmp
Docker environment with bundled Linux, Nginx, MariaDB, PHP-FPM
https://github.com/cakebake/docker-lnmp
docker docker-compose ioncube linux locale mariadb nginx php-fpm phpmyadmin wordpress xdebug
Last synced: about 2 months ago
JSON representation
Docker environment with bundled Linux, Nginx, MariaDB, PHP-FPM
- Host: GitHub
- URL: https://github.com/cakebake/docker-lnmp
- Owner: cakebake
- Created: 2018-09-06T11:11:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T12:57:03.000Z (over 7 years ago)
- Last Synced: 2025-01-05T05:26:12.781Z (over 1 year ago)
- Topics: docker, docker-compose, ioncube, linux, locale, mariadb, nginx, php-fpm, phpmyadmin, wordpress, xdebug
- Language: Dockerfile
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Docker LNMP
===========
Docker environment with bundled Linux Nginx MariaDB PHP-FPM environment. For development and production usage.
Features
--------
- **PHP-FPM 7.2**
- ionCube PHP Loader
- Zend OPcache
- Xdebug (Set breakpoint in code with function `xdebug_break()`\)
- Composer
- Imagemagick
- **MariaDB** (Container is stateless and data is mapped to `./services/mariadb/data` directory)
- phpMyAdmin
- Default locale `de_DE.UTF-8`
- Default localtime `Europe/Berlin`
Configuration
-------------
- Rename `example.env` to `.env` and edit to your needs
- Remove all files and directories from `./htdocs`
- Download and copy your web project to `./htdocs`
- Configure your web project with the defined ENV vars (e.g. `getenv('MYSQL_PASSWORD')`)
Usage
-----
### Docker compose
`@see` https://docs.docker.com/compose/reference/
### Build
```
docker-compose build
```
### Run
```
docker-compose up
```
or
```
docker-compose up -d
```
> Param `-d` runs container in background (detach)
### Bash into
> Replace `docker-lnmp_*` with your container names
```
$ docker exec -ti docker-lnmp_php_1 /bin/bash
$ docker exec -ti docker-lnmp_nginx_1 /bin/bash
```
Database backup
```
$ docker exec docker-lnmp_mariadb_1 sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD"' > /some/path/on/your/host/all-databases.sql
```
### Stop
```
docker-compose down
```
> To stop all containers AND kill all volumes `docker-compose down --volumes`
### Access
Web
http://localhost:8080/
phpMyAdmin
http://localhost:8282/
MariaDB
Usage of ENV variables. For example see `./htdocs/test/env.php` and config section of this page.