Public | Automated Build

Last pushed: 5 days ago
Short Description
Operation Spark Website
Full Description

operationspark.org

Setup

$ npm install
$ bower install

Run

$ mongod
$ grunt serve

To run the compiled site locally:

$ grunt serve:dist

Develop

Client

All client related files are in client/ :)<br>

Static pages

  • Create the template in client/app/templates/
  • This template can be raw html if you're lame or it can be a jade template like the rest. :)
  • Create a route for the page in client/app/app.coffee
  • We're using https://github.com/angular-ui/ui-router

New Changes (Updated & Dockerized):

  • Now using updated node version 6, also works with newest node version and updated minification modules
  • Dockerized for easy deployment…not fully automated yet, will need to run 1 command in aws container until i figure out how to automate this command with aws, i only know how to do this with digital ocean (they have a GUI).

To make changes:

  • fork website_markIII from operation spark to your github and clone
    $ bower install
    $ npm install
    
  • make changes
  • push to your forked repo
  • make pull request to operation spark
  • a pull request to master on operation spark will trigger a automated build

Deploy

To redeploy website:

  • once automated build is finished on docker hub (approximately 8 minutes)

1) ssh into aws instance:

$  ssh -i "website_markIII.pem" ubuntu@ec2-52-205-252-85.compute-1.amazonaws.com

2) Compose file is located n workspace directory

$ cd workspace

3) Pull the new image, rebuild, and serve

$ docker-compose pull client && docker-compose up -d client

This will pull new changes from docker hub then service will run grunt build to minify this will take approximately 5 min. New changes will show after that, make sure to clear your cache.

Renew Cert

1) ssh into aws instance:

$  ssh -i "website_markIII.pem" ubuntu@ec2-52-205-252-85.compute-1.amazonaws.com

2) Compose file is located n workspace directory

$ cd workspace

3) Stop current containers and re-serve

$ docker-compose down && docker-compose up -d

This will stop current containers, then re-serve containers. Client Service will run grunt build to minify this will take approximately 5 min. SSL container is using letsencrypt and nginx behind it. SSL will be renewed...takes approximately 10-15 min

DO NOT

 $ docker-compose up -d

Do not run this command without specifing client if you are not trying to renew certs as this will trigger the ssl service to recreate certificates. If we do this 5 times within a week we will not have ssl for two weeks. (i think, i actually think it won’t but im not sure and to test it i have to do it, so lets just be safe and not do it).

Docker Pull Command
Owner
shamsali
Source Repository

Comments (0)