Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albertcolom/docker-lemp
Docker multicontainer: Nginx, php7-fpm, MySQL + Redis
https://github.com/albertcolom/docker-lemp
docker docker-compose docker-multicontainer lemp mysql nginx php7-fpm redis
Last synced: about 1 month ago
JSON representation
Docker multicontainer: Nginx, php7-fpm, MySQL + Redis
- Host: GitHub
- URL: https://github.com/albertcolom/docker-lemp
- Owner: albertcolom
- Created: 2016-08-01T13:22:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-04T21:33:48.000Z (over 5 years ago)
- Last Synced: 2023-08-06T11:29:28.517Z (over 1 year ago)
- Topics: docker, docker-compose, docker-multicontainer, lemp, mysql, nginx, php7-fpm, redis
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Docker LEMP + Redis
===========================
[![Build Status](https://travis-ci.org/albertcolom/docker-lemp.svg?branch=master)](https://travis-ci.org/albertcolom/docker-lemp)
### Docker multicontainer: Nginx, php7-fpm, MySQL, Redis### Requirements
- [Docker](https://www.docker.com/)
- [Docker Compose](https://docs.docker.com/compose/install/)### Installation
Clone this repository
```sh
$ git clone [email protected]:albertcolom/docker-lemp.git
```Start docker compose
```sh
$ docker-compose up -dCreating docker_mysql_1
Creating docker_php_1
Creating docker_web_1
Creating docker_redis_1
```List the contents
```sh
├── README.md
├── config
│ ├── nginx
│ │ └── default.conf
│ └── php-fpm
│ └── php-fpm.conf
├── docker-compose.yml
├── logs
│ └── nginx
│ ├── access.log
│ └── error.log
└── www
└── index.php
```
Web Server
- [http://localhost:8080](http://localhost:8080)List the containers
```sh
$ docker-compose psName Command State Ports
-------------------------------------------------------------------------------------------------
docker_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
docker_php_1 php-fpm Up 0.0.0.0:9080->9000/tcp
docker_redis_1 docker-entrypoint.sh redis Up 0.0.0.0:6379->6379/tcp
docker_web_1 nginx -g daemon off; Up 0.0.0.0:443->443/tcp, 0.0.0.0:8080->80/tcp
```Stop containers docker compose
```sh
$ docker-compose stopStopping docker_web_1 ... done
Stopping docker_php_1 ... done
Stopping docker_redis_1 ... done
Stopping docker_mysql_1 ... done
```Remove containers docker compose
```sh
$ docker-compose rm -fGoing to remove docker_web_1, docker_php_1, docker_redis_1, docker_mysql_1
Removing docker_web_1 ... done
Removing docker_php_1 ... done
Removing docker_redis_1 ... done
Removing docker_mysql_1 ... done
```### Tips
Connect to Docker container
```sh
$ docker exec -i -t 665b4a1e17b6 /bin/bash #by ID
or
$ docker exec -i -t docker_redis_1 /bin/bash #by Name
```Stop all Docker containers
```sh
$ docker stop $(docker ps -a -q)
```Remove all Docker containers
```sh
$ docker rm $(docker ps -a -q)
```Remove all Docker images
```sh
$ docker rmi $(docker images -q)
```