wget https://raw.githubusercontent.com/certbot/certbot/75499277be6699fd5a9b884837546391950a3ec9/certbot-auto
chmod +x ./certbot-auto
./certbot-auto --no-self-upgrade
version: '2'
services:
nginx:
image: shippingdocker/nginx:1.2
ports:
- "80:80"
volumes:
- .:/var/www/html
networks:
- appnet
php:
image: shippingdocker/php:1.2
volumes:
- .:/var/www/html
networks:
- appnet
redis:
image: redis:alpine
networks:
- appnet
db:
image: mysql:latest
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_USER: dev
MYSQL_PASSWORD: 123456
MYSQL_DATABASE: myapp
networks:
- appnet
mail:
image: mailhog/mailhog:latest
ports:
- "9025:8025"
networks:
- appnet
networks:
appnet:
driver: "bridge"
volumes:
data:
driver: "local"
Docker can be extremely useful, if you know what you're doing with it. In this series, I'll show you how to effectively use it to straighten out your stack.
LEMP is a variation of the ubiquitous LAMP stack used for developing and deploying web applications. Traditionally, LAMP consists of Linux, Apache, MySQL, and PHP. Due to its modular nature, the components can easily be swapped out. With LEMP, Apache is replaced with the lightweight yet powerful Nginx.
