A website built with ruby on rails to show group posts, analytics and other group related content.
- Ruby 2.5.0
- SQlite3
- Nodejs
- npm
- Yarn
-
Install bundler
gem install bundler
-
Install dependencies
bundle install yarn install
-
import posts, it assumes
postsproject is cloned in the same directory as this projectrails db:setup posts:import
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
With every push to github master branch a docker hub will build an image egygeeks/website
-
Generate a secret to use it for rails encryption
rails secret
-
Export the generated secret to your local machine shell, add the following to
~/.bashrcor~/.bash_profileexport EGYGEEKS_SECRET_KEY_BASE=<generated secret>
-
Make sure your variable is defined, the following command should print the secret
echo $EGYGEEKS_SECRET_KEY_BASE
-
bin/deploycan pull, stop container then run new docker image, you need to pass your server IP to itbin/deploy user@server-ip
-
deployis 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.
