Personal website built with AngularJS and MongoDB
- Make sure your node version is at least 7
nvm i 7
andnvm use 7
- Install dependencies with
npm i
andbower i
- Make sure you have MongoDB installed and running on port 27017
- This project looks up configuration information from Redis, you can spin one locally using this image
- Define the following keys in your Redis store:
mongohost
Mongo host IPlogglyconfig
Loggly JSON configurationgoogleapi
Google API JSON configuration
- Provide AWS credentials in
~/.aws/credentials
- Start the backend using
pm2 start rgapp-pm2.json --env development
- Access
http://localhost:8080
in the browser.
npm test
ortestem ci
To build the image,
- Node.js and Angular app
- In project root, run
docker build -t frishi/rishighanangular_web:latest .
- Then push it to Docker Hub with
docker push frishi/rishighanangular_web:latest
- In project root, run
To deploy, simply push to master
The app is deployed via Wercker
to a Digital Ocean
droplet running a Docker host.
Wercker configuration is found in wercker.yml
. Note that Wercker does not build from a Dockerfile, so the steps in wercker.yml
are exactly the same as the Dockerfile, with relevant changes per Wercker's nuances.
Note: Since you are dealing with unmanaged droplets when it comes to Digital Ocean, you have to be careful of how much disk space the docker containers use up upon each deployment. Create a task in /etc/cron.daily
to prune dangling, exited containers to keep the disk usage in check. See here.
This project is basically a blog with a homegrown CMS that integrates with Google Analytics API to fetch pageviews.
MongoDB and Redis are deployed independently as Docker containers via Wercker as well. The related repos are found here:
gg