Mix Answer is a Question & Answer platform, a StackOverflow like tool.
Mix Answer uses modern tools
- Docker #containers
- Python 3.6 #server
- PostgreSQL #database
- Tornado #server
- ReactJS #frontend
- 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
https://www.lucidchart.com/documents/embeddedchart/963a601e-0870-45c2-871f-acdb405c5090
# 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
- Copy the
docker-compose-prod.yml
file on the server you want to deploy the tool - Run
docker-compose up -d
it will automatically pull the images and start the services - Init the DB
docker-compose run --rm --no-deps mix-answer-server python scripts/init_db.py --config config/prod.conf