Giter VIP home page Giter VIP logo

gw-pool's Introduction

gw-pool

A micro service for real time data persistence

Deployment

There are two ways to run this service, via localhost or using docker-compose. Even so all required commands are located into the Makefile

Localhost

  1. Make sure all environment variables are properly set into the .env file. Especially the DATABASE_DNS points to localhost.
  2. Both server and client needs an environment variable DOTENV_PATH to know where to find the .env file. The Makefile sets it automatically, but be aware if using your own dotenv file.
  3. Execute the server in a terminal using the make run command.
  4. In a new terminal you can deploy and undeploy the database using the make deploy and make undeploy respectively.

Docker

  1. Make sure all environment variables are properly set into the .env file. Especially the DATABASE_DNS points to postgres instead of localhost.
  2. Build the image running into the terminal the command make build.
  3. Make sure the docker-compose file has the backend specifications uncommented.
  4. Deploy the server and database using the make deploy command. The make undeploy will undeploy both containers as well.

Setup

Once server and database are both running, it's all ready for sending requests to the server. The command make ping will send a dummy request for you. However, this will fail if the database do not have the expected table: locations.

To make it so, into the sql folder are provided both sql scrips to create the database and drop it. Also, the docker-compose deploys an instance of pgadmin in order to manage de database and execute such scrips.

When connecting to the database through pgadmin remember that all credentials are located into the .env file and the database's host is postgres.

gw-pool's People

Contributors

hectormrc avatar

Watchers

James Cloos avatar  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.