Giter Site home page Giter Site logo

mix-answer's Introduction

Mix Answer

Build Status

Overview

Mix Answer is a Question & Answer platform, a StackOverflow like tool.

Technologies

Mix Answer uses modern tools

Development

  • Setup
# Build images
docker-compose build

# Run containers
docker-compose up -d

# Init database
docker-compose run --rm --no-deps mix-answer-server python scripts/init_db.py --config config/dev.conf --data_test true
  • You can now access the UI
http://localhost:8080

DB Class Diagram

https://www.lucidchart.com/documents/embeddedchart/963a601e-0870-45c2-871f-acdb405c5090

Tests

# Build and tag the test image
docker build -t mix-answer-test \
             -f server/tests/Dockerfile \
             server

# Start the test DB container
docker run -d \
           -e POSTGRES_USER=mixuser \
           -e POSTGRES_PASSWORD=mixuser \
           -e POSTGRES_DB=mixanswer \
           --name mix-answer-test-db \
           postgres:10.3

# Initialize the test DB
docker run -t --rm \
           -v /$PWD/server:/home/server \
           --link mix-answer-test-db:db \
           mix-answer-test \
           python scripts/init_db.py --config=config/test.conf

# Run test
docker run --rm -it \
           -v /$PWD/server:/home/server \
           --link mix-answer-test-db:db \
           mix-answer-test \
           pytest -v

Deployment

  1. Copy the docker-compose-prod.yml file on the server you want to deploy the tool
  2. Run docker-compose up -d it will automatically pull the images and start the services
  3. Init the DB docker-compose run --rm --no-deps mix-answer-server python scripts/init_db.py --config config/prod.conf

Roadmap

Open roadmap

Contribution

  • Please use flake8 (Python) and eslint (JavaScript) as syntax linter
  • Please write and run the tests before to submit a Pull Request
  • Please open a Pull Request for review

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.