[Development] Steemhunt back end API dockerize

in #utopian-io6 years ago (edited)

Steemhunt is a website build on top of steem blockchain that allows author to hunt for new and cool products.

Untitled design (1).jpg

Since the backend server was written in Ruby on Rails, it requires front end contributors to know a little bit knowledge about ruby on rails in order to contribute. Other pain about using ruby is installation on Windows. Therefore, I decided to dockerize the back end Ruby On Rails server in order to help out the front end developers to work on front end web without hassle on setting up the back end.

image.png
Questions being asked on Steemhunt discord regarding on installation of ruby

Pull Request made

https://github.com/Steemhunt/api/pull/36

Repository

https://github.com/Steemhunt/api

New Features

  • What feature(s) did you add?

    • Dockerize Steemhunt back end API server
    • Added docker usage guide into README.md
    • Set up the back end with just 2 lines of bash command: docker-compose build && docker-compose up
  • How did you implement it/them?

From the commit history e2cfbf6d39e3271e28bd5cc0a746fff5f08de23c, I tried a few attempts for setting up both back end and front end with ruby bundler command and use a different environment variable called docker, but my final choices ended up back to the basic one.

The Dockerfile is used to pull Ruby images from docker and move all the files. docker-compose.yml file is used to setup PostgreSQL server and link Rails to PostgreSQL. Then, port 5432 is open for PostgreSQL and 3001 for Ruby On Rails API server.

The following on commit e8f50f3bd49549baaa43edd3de7b6c86a77313d4 was discussed with @tabris the lead developer of SteemHunt, where we decided not to create a new environment, and stick back to dev environment, the commit was done to delete the duplicate codes.

About Projects

  • What is the project about?

Steemhunt is a website build on top of steem blockchain that allows author to hunt for great products.

  • Technology Stack

    • Ruby On Rails
    • PostgreSQL
  • How to contribute?

Steemhunt is open source on GitHub, where there are 2 seperate repository to seperate the front end and backend. I had written a tutorial on setting up the environment for back end and front end.

The back end server is build with Ruby On Rails and PostgreSQL.

https://github.com/Steemhunt/api

The front end web is build with React.js with Redux.

https://github.com/Steemhunt/web

GitHub Account

https://github.com/superoo7

Sort:  

I swear this guy never sleeps. And when he does sleep, he is probably dreaming about @SteemHunt dev code.

lol, I am on vacation right now, just do it at night haha. Thanks for stopping by

Thank you for your contribution. This really helps to save time for front-end developers. So, if I am lazy enough, I don't want to install Ruby on Rails and also I don't want to install docker, is there a public test backend server that I can use?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Currently no, there is only production server. But great suggestions, maybe when there are more developers contributing, then this is required.

Great contribution. Steemhunt is happy to have you as a contributor!

Thanks man :)

Thank you for sharing your posts with us. This post was curated by TeamMalaysia as part of our community support. Looking forward for more posts from you.

To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach

Vote TeamMalaysia witness bitrocker2020 using this link vote bitrocker2020 witness

Hey @superoo7
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.028
BTC 76323.20
ETH 2986.08
USDT 1.00
SBD 2.62