LNMP(Nginx, PHP, Mysql, Redis) service deploy through docker swarm mode.
docker swarm init
Notice: if using command through docker-compose
, you may make some changes to this docker-compose.yaml
file to adjust some settings like secret
- Create mysql password through docker secret
$ echo "my-secret-pw" | docker secret create mysql_root_password -
- Deploy or update a stack
$ docker stack deploy -c docker-compose.yml lnmp