Steps:
-
Create Digital Ocean Droplet with Dokku v0.3.16 on 14.04 image
-
Login into the droplet and Update local settings.
sh -c "echo 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale" reboot
-
Open
http://<ip_address_of_droplet>
to configure dokku settings. -
Add dokku remote to your source code(from your development machine). In below code,
app_name
can be anything. It should be used when configure the database.```shell git remote add dokku dokku@<ip_address_of_droplet>:<app_name> git push dokku master ```
-
Install MongoDB dokku plugins in Digital Ocean droplet.
```shell git clone https://github.com/jeffutter/dokku-mongodb-plugin.git /var/lib/dokku/plugins/mongodb dokku plugins-install ```
-
Create database
```shell dokku mongodb:start dokku mongodb:create <app_name> ```
-
Change your MongoDB url to
process.env.MONGO_URL
and commit your source code. (You must push app again to take mongodb url) It will print the URL of the app. You can visit the app in browser.```shell git push dokku master ```
-
You can also view mongodb config
```shell dokku config <app_name> ```
Hi, is it possible to scale the service to more instances? If so, how can I do that?
Thank you