Host your own PaaS (platform as a service) on Amazon Web Services

Dokku is an open-source PaaS that allows you to deploy and host multiple applications on a single server. Its functionality is similar to the backend of a service like Heroku, managing tasks such as scaling, load balancing, and database management.

He…


This content originally appeared on DEV Community and was authored by James Murdza

Dokku is an open-source PaaS that allows you to deploy and host multiple applications on a single server. Its functionality is similar to the backend of a service like Heroku, managing tasks such as scaling, load balancing, and database management.

Here's how you can set up Dokku from scratch on AWS:

1. Launch the server

In the AWS control panel, create a new EC2 instance.

  • Select Ubuntu 12
  • Create a new SSH key pair
  • Allow public SSH, HTTP, and HTTPS access to the server

2. Configure DNS

Let's assume your domain is mydomain.com, and you want to host applications as appname.mydomain.com.

In your DNS control panel, create two records:

  • A Record pointing @ to the EC2 instance's public IP address
  • A Record pointing * to the EC2 instance's public IP address

3. Setup the server

SSH into the EC2 instance and install Dokku:

wget -NP . https://dokku.com/bootstrap.sh
sudo DOKKU_TAG=v0.34.6 bash bootstrap.sh
dokku domains:set-global mydomain.com
cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin

4. Create a test application

On the same EC2 instance, run:

dokku apps:create myapp
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
dokku postgres:create railsdatabase
dokku postgres:link railsdatabase ruby-getting-started

5. Set up SSH authentication

On your local machine, add the following to .ssh/config:

Host mydomain.com
    HostName mydomain.com
    User dokku
    IdentityFile ~/ServerKey.pem

6. Deploy a test application

Then, on your local machine, run these commands to deploy a test application:

git clone https://github.com/heroku/ruby-getting-started
cd ruby-getting-started
git remote add dokku dokku@example.com:myapp
git push


This content originally appeared on DEV Community and was authored by James Murdza


Print Share Comment Cite Upload Translate Updates
APA

James Murdza | Sciencx (2024-07-14T22:30:42+00:00) Host your own PaaS (platform as a service) on Amazon Web Services. Retrieved from https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/

MLA
" » Host your own PaaS (platform as a service) on Amazon Web Services." James Murdza | Sciencx - Sunday July 14, 2024, https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/
HARVARD
James Murdza | Sciencx Sunday July 14, 2024 » Host your own PaaS (platform as a service) on Amazon Web Services., viewed ,<https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/>
VANCOUVER
James Murdza | Sciencx - » Host your own PaaS (platform as a service) on Amazon Web Services. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/
CHICAGO
" » Host your own PaaS (platform as a service) on Amazon Web Services." James Murdza | Sciencx - Accessed . https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/
IEEE
" » Host your own PaaS (platform as a service) on Amazon Web Services." James Murdza | Sciencx [Online]. Available: https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/. [Accessed: ]
rf:citation
» Host your own PaaS (platform as a service) on Amazon Web Services | James Murdza | Sciencx | https://www.scien.cx/2024/07/14/host-your-own-paas-platform-as-a-service-on-amazon-web-services/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.