If you had been watching Steemhunt github, there is so many issues pilling up on steemhunt/web, but only the core developer @tabris and me working on the issues.
One of the issue of new contributors having to contribute to steemhunt is about installation of steemhunt in their environment. Personally, I also find that Ruby On Rails setup on different OS will have different outcomes, therefore from day 1 of me contributing to SteemHunt, I always wanted to dockerize the project so that everyone can use it with ease.
Today, I just send in a Pull Request #36 that I dockerize the back end server of SteemHunt, therefore I decided to write a tutorial on how to setup SteemHunt on your local machine that works on all OS including Windows, Linux and Mac.
(I tested this on Linux Mint and Mac)
Step 0: Installed required software
Since docker is used in this case, you need to install docker.
- install docker
- install git
- install node and npm
Step 1: Clone the repo
Create a folder to store both web and api repository.
(Since my pull request have not been merged, you need to use my repository)
- Official repo: https://github.com/Steemhunt/api/
- My repo: https://github.com/superoo7/api/ (With docker file)
> mkdir steemhunt && cd steemhunt
> git clone https://github.com/superoo7/api.git # replace to https://github.com/Steemhunt/api.git in future
> git clone https://github.com/Steemhunt/web.git # you can change this into your own forked repo
Step 2: Setup back end
Setting up the ruby on rails back end with ease! Open up a new terminal and run the following:
> cd api
> docker-compose build
> docker-compose up
Terminal 1
The docker will setup rails API server at localhost:3001
and postgres server at localhost:5432
.
Step 3: Setup front end
Once back end server is up, you can setup the front end.
> cd web
> npm install
open another terminal to run scss compiler of the web and another terminal to run react script on localhost:3000
> cd web
> npm run build-css
Terminal 2: scss compiler
> cd web
> npm run start
Terminal 3: React front end server at localhost:3000
The front end will be available at localhost:3000
localhost:3000
Conclusion
With the docker file being available, setting up the back end server are really easy. I hope that my contribution on dockerize steemhunt api server will drive interest of more front end developers to help out Steemhunt to develop and clear up pending issues.
This post has been curated by TeamMalaysia Community :-
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 for witness
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I imagine this will be uber useful for developers who want to live test their codes in a sandbox environment?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
yea, basically you don't need to know the back end setup and database setup, and you can have a back end spin up to test ur front end
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@superoo7 I see how this will be useful for front end devs... Speaking of which maybe i dont have the eye for it but do you think steemhunt frontend needs for front end changes? look mighty cool to me already..
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
if you check on github, there are more than 70 issues being filed LOL
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@superoo7 Devs gonna get real busy!!!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
hi superoo7,
very interesting but prob..!!
frontend launch and accessible
but many problems with API during the test for installation (step docker-build crash ..)
I try to be inspired by the whole to create something else with in the idea steem, Eth, TRx
would you have any fixes to be able to test the foundations
thx
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit