Skip to content

claudiocro/tektronix-metacatalog-sane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Tektronix Metacatalog SANE project This is a SANE project for a web-app that allows to link tektroniks oscillators models to their appearances in the annual tektroniks catalogs.

This project is the container for a Ember client and a Sails server and it's used to speed up development. Release and deploy is managed by the projects themselves.

Installation:

If you haven't read https://github.com/artificialio/sane or http://sanestack.com/ then go and do it. This project heavily depends on it.

You will need the following things properly installed on your computer.

Install sane and sails if they are not already on your machine: npm install -g sails sane-cli

Clone SANE repo: git clone https://github.com/claudiocro/tektronix-metacatalog-sane.git

Clone server repo: git clone https://github.com/claudiocro/tektronix-metacatalog-server.git server

Clone client repo: git clone https://github.com/claudiocro/tektronix-metacatalog-client.git client

Install bower and npm dependencies, run this commands from the client folder:

cd client
npm install
bower install
cd ..

Server

The server can be configured to either run on your local machine without any need to install mongodb or any other sql/nosql database on your system or in a docker container.

###Server local To start sane on your local machine:

cd server
npm install
cd ..
sane up

Visit app at: http://localhost:4200/ Server API is served at: http://localhost:1337/api/v1/

The server can be debugged with node-debug:

cd server
node-debug app.js --save-live-edit
cd client
ember serve --proxy http://127.0.0.1:1337

Debug server at: `http://127.0.0.1:8080/debug?ws=127.0.0.1:8080&port=5858

###Server Docker Make shure you have Docker and Docker Compose installed on your machine.

If the server is started with the --docker option it will launch three containers to simulate a production environment:

  • server is where sails gets executed and the local server directory gets mounted into it.
  • mongodb used to store the models
  • redis used to store sessions and ember-build index-files

It's important that the server/node_modules directory is empty before we start, so that docker will build the npm modules from scratch.

rm -r server/node_modules
sane up --docker

To rebuild the node_modules inside the container run:

docker-compose run server rm -R node_modules
docker-compose run server npm install

To redirect your traffic to mongodb run: boot2docker ssh -L 27017:localhost:27017

#Deploy a client locally to docker

Make shure your docker container are running. Redirect to REDIS docker container: boot2docker ssh -L 6379:localhost:6379

To deploy to your docker container (not yet thought through:): Read this for more information: http://ember-cli.github.io/ember-cli-deploy/docs/v0.4.x/fingerprinting-options-and-staging-environments/

cd client
ember deploy --environment=docker

Ignore the errors ember deploy:index --environment docker

Search for ** in the output console Uploaded revision: tektronix-metacatalog-client:

Activate version:

ember deploy:activate --revision tektronix-metacatalog-client:<sha> --environment=docker
cp -R tmp/deploy-dist/ ../server/assets

Start

cd ..
sane up --docker --skip-ember

Visit you app at: http://localhost:1337

Further Reading / Useful Links

About

Glue project for tektronix-metacatalog app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published