Skip to content

gmvivekmishra/website

 
 

Repository files navigation

Website for geeks

A website built with ruby on rails to show group posts, analytics and other group related content.

ScreenShot

Requirements

  • Ruby 2.5.0
  • SQlite3
  • Nodejs
  • npm
  • Yarn

Installation

  • Install bundler

    gem install bundler
  • Install dependencies

    bundle install
    yarn install
  • import posts, it assumes posts project is cloned in the same directory as this project

    rails db:setup posts:import

How it is generated

The following command was used to generate project files

rails new website --database=sqlite3 --skip-action-mailer --skip-spring --skip-action-cable --skip-coffee --skip-test

Deployment

With every push to github master branch a docker hub will build an image egygeeks/website

Prerequisite

  • Generate a secret to use it for rails encryption

    rails secret
  • Export the generated secret to your local machine shell, add the following to ~/.bashrc or ~/.bash_profile

    export EGYGEEKS_SECRET_KEY_BASE=<generated secret>
  • Make sure your variable is defined, the following command should print the secret

    echo $EGYGEEKS_SECRET_KEY_BASE

Deployment

  • bin/deploy can pull, stop container then run new docker image, you need to pass your server IP to it

    bin/deploy user@server-ip
  • deploy is 3 lines lines script:

    • pulls the image
    • stop old container
    • start new container forwarding port 3000 from inside the container to port 10001
  • the container port 10001 is listening to local requests so it's not exposed to the internet

  • You have to configure your http server to forward requests to that port.

About

Egyptian geeks website, the utilizes the "posts" dataset

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 66.7%
  • Haml 17.4%
  • HTML 12.9%
  • Dockerfile 1.2%
  • JavaScript 1.0%
  • Shell 0.6%
  • CSS 0.2%