Giter Site home page Giter Site logo

dokku-provisioner's Introduction

Dokku provisioner

Dokku is a fantastic tool! According to their website, Dokku is an open-source PAAS alternative to Heroku that helps you build and manage the lifecycle of applications from building to scaling.

In 2022, Heroku has decided to discontinue the free plans, which increased the number of people looking for free alternatives. That's where Dokku comes in, it provides everything Heroku offered, if you have a host to install it and if you are willing to learn how it works.

The objective of this project is to shorten the learning curve for those who want to use Dokku. It is a ruby script that will ask questions about the app that will be installed and will list the commands you need to run to have you app up and running in no time.

How to use it

This is a pure ruby project, so you need to have ruby installed on your machine. If you don't have it, you can follow this guide to install it.

After cloning the project, you need to install the dependencies. To do that, run:

bundle install

Then, you are ready to run the script. In the terminal, at the root folder of this project, run:

ruby setup.rb

Then, follow the instructions on your dokku server.

Tests

To run the tests, use RSpec's command:

rspec

If you need to run the tests of one single file, you can specify it:

rspec spec/models/mytest_spec.rb

Customizing to your needs

If you run the script, you will come across placeholders, like this:

dokku postgres:backup-auth api-database <AWS_ACCESS_KEY_ID> <AWS_SECRET_ACCESS_KEY>
git remote add dokku dokku@<IP ADDRESS>:api

See those variables inside <>? You need to replace them with your values when running the commands on your Dokku server. However, if you plan to install many apps on the same server, it gets boring to keep replacing the placeholders with the same values over and over again. That's why you can create a .env file at the root of this project and add the values you want to replace the placeholders with.

The simplest way to start is by duplicating the .env.example file and renaming it to .env. Then, you can replace the values inside it with your values (and fear not, the .env file is going to be ignored by git, so there is no risk of you committing any secret to the repository).

.env example:

DOKKU_SERVERS=127.0.0.1,my-host.com
AWS_ACCESS_KEY_ID=AAAAABBBBB1231401010
AWS_SECRET_ACCESS_KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZ

DOkKU_SERVERS is a special variable. If it is empty, you will see a placeholder on the instructions output. Otherwise, it can hold any number of IP addresses or hostnames, separated by commas. If you have more than one server, the script will ask you which one you want to use.

dokku-provisioner's People

Contributors

arturcp avatar

Stargazers

Esteban Damian Fuhrmann avatar Guilherme Sehn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.