Enable nginx and docker on system startup when using bootstrap.sh on CentOS

This commit is contained in:
Edgars Beigarts
2017-03-15 14:52:29 +02:00
parent 621b31839e
commit 7ba063c6bb
2 changed files with 12 additions and 3 deletions

View File

@@ -167,6 +167,10 @@ install-dokku-from-rpm-package() {
yum -y install herokuish dokku
fi
echo "--> Enabling docker and nginx on system startup"
systemctl enable docker
systemctl enable nginx
echo "--> Starting nginx"
systemctl start nginx
}

View File

@@ -7,16 +7,21 @@
Dokku defaults to being installed via RPM package on CentOS 7. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script:
```shell
# install docker
# Install docker
curl -fsSL https://get.docker.com/ | sh
# install epel for nginx packages to be available
# Install epel for nginx packages to be available
sudo yum install -y epel-release
# install dokku
# Install dokku
curl -s https://packagecloud.io/install/repositories/dokku/dokku/script.rpm.sh | sudo bash
sudo yum install -y herokuish dokku
sudo dokku plugin:install-dependencies --core
systemctl start nginx
# Enable docker and nginx on system startup
systemctl enable docker
systemctl enable nginx
```
The [devicemapper](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/) is the default Docker storage driver on CentOS 7 and defaults to a configuration mode known as `loop-lvm`. This mode is designed to work out-of-the-box with no additional configuration. However, production deployments should not run under `loop-lvm` mode. The preferred configuration for production deployments is [`direct-lvm`](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production).