GithubHelp home page GithubHelp logo

sectorv-server's Introduction

Backend expressJS template

Using Docker

Start containers

Pre-requisite: Have docker and docker-compose installed.

  1. Clone the repo
git clone [email protected]:covid-group1/covid-backend.git
  1. Update the .env variables in the ./server/ directory. (not used now)

  2. Build the image

docker build -t template-backend ./server/
  1. Start the containers
make dev-start

or

docker-compose -f ./server/docker-compose.local.yml up -d
  1. The API url is localhost:4000
  2. To see Mongo admin interface visit localhost:8081

Stop the project

make dev-stop

or

docker-compose -f ./server/docker-compose.local.yml down

Stop and delete volumes (drop db)

make dev-drop

or

docker-compose -f ./server/docker-compose.local.yml down -v

Run a command in node container

make dev-runweb CMD="<command>"

or

docker-compose -f ./server/docker-compose.local.yml run web <command>

Example: Add a new dependency

make dev-runweb CMD="yarn add <new_dependency>"

or

docker-compose -f ./server/docker-compose.local.yml run web yarn add <new_dependency>

Run a command in mongo container

make dev-rundb CMD="<command>"

or

docker-compose -f ./server/docker-compose.local.yml run db <command?

docker-compose logs

make dev-logs

or

docker-compose -f ./server/docker-compose.local.yml logs --follow

Run tests

make test

or

docker-compose -f ./server/docker-compose.local.yml run web yarn test

Deployment instructions (WIP)

Ansible configuration:

Requirements

  • Workstation with ansible installed
  • ssh access to server (with root) running ubuntu 16.04

Steps

  1. cd ./ansible
  2. run on workstation: ansible-playbook -i production_server --private-key /path/to/your/root/access/key site.yml

sectorv-server's People

Contributors

estebanquintana6 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.