GithubHelp home page GithubHelp logo

ithehuo's Introduction

IT 合伙人

Technologies used in this project:

Database: Mongodb

ODM: Mongoose

Runtime: Nodejs

MVC framwork: Express

HTML template: Jade

UI framework: Bootstrap3, jQuery

Test framework: Mocha

========================================= setup testing environment by docker in ubuntu 14.04

=======install docker=================== sudo apt-get update && apt-get upgrade -y sudo reboot apt-get install curl curl -s https://get.docker.io/ubuntu/ | sudo sh

=========setup db (only once)=========== //get mongo image docker pull mongo:latest

=========clone/update ithhr project========= git clone https://git.oschina.net/tala/ithhr.git

==========create ithhr image============= cd ithhr docker build -t ithhr . the Dockerfile will get node image for use, and expose 3000 port

=========start db container============== docker run -d --name db mongo //a clean db every time docker run -d --name db -v /root/data:/data/db/ mongo //data is persistent

=========start ithhr container============= docker run -it -d -p 3000:3000 --name ithhr --link db:db ithhr

=========check status==================== docker images: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ithhr latest 6db501be9e7a 4 minutes ago 755.3 MB mongo latest be2c71632559 7 days ago 255.9 MB node 0.10-onbuild 5187678bae07 2 weeks ago 697.4 MB

docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6c1f5be91956 ithhr:latest "npm start" About a minute ago Up About a minute 0.0.0.0:8005->8005/tcp ithhr 557643369aed mongo:latest "/entrypoint.sh mong 3 minutes ago Up 3 minutes 27017/tcp db

==========refresh build and clear env:================

  1. docker stop ithhr
  2. docker rm ithhr
  3. create a new image version docker build -t ithhr:0.1 .
  4. create a new ithhr:0.1 container docker run -it -d -p 3000:3000 --name ithhr --link db:db ithhr:0.1

ithehuo's People

Contributors

lujjiang avatar sallymi avatar njaulj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.