Stay updated with GS News!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
To get a local copy up and running follow these simple steps.
Make sure you have the following software installed and running on your computer:
Check docker version
$ docker -v
Docker version 19.03.13, build 4484c46d9d
Check docker-compose version
$ docker-compose -v
docker-compose version 1.27.4, build 40524192
Check docker-machine version
$ docker-machine -v
docker-machine version 0.16.0, build 702c267f
- Clone the repo
$ git clone https://github.com/PHmark/gs-news-app.git
- Create a docker machine inside a virtualbox
$ docker-machine create -d virtualbox gs-news-app
- Run the docker-machine (Linux):
$ eval "$(docker-machine env gs-news-app)"
- For Windows users, use the command
$ @FOR /f "tokens=*" %i IN ('docker-machine env gs-news-app') DO @%i
- Make sure you Docker client is pointed to gs-news-app virtualbox
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
gs-news-app * virtualbox Running tcp://192.168.99.107:2376 v19.03.12
- Install using docker-compose
$ docker-compose build
$ docker-machine ip gs-news-app
192.168.99.107
# For Linux
$ export REACT_APP_API_SERVICE_URL=http://192.168.99.107
# For windows
$ set REACT_APP_API_SERVICE_URL=http://192.168.99.107
$ docker-compose up -d
$ docker-compose run api python manage.py seed_db
$ docker-compose run api python manage.py test
$ docker-compose run api flake8 app
$ docker-compose run api python manage.py cov
6. Open your virtualbox's IP Address on web browser, on the example above the IP Address was 192.168.99.107. (Might take some time for the React App to load.)
- [POST] /user/register_ - User account registration
- [POST] /user/login - User account login
- [POST] /topic - Creation of a topic
- [PATCH] /topic - Update a topic
- [DELETE] /topic - Delete a topic
- [POST] /topic/{id}/message - Create a message on a topic.
- [GET] /topics - Retrieve all topics.
- [GET] /topic/{id}/messages - Retrieve all messages in a topic.
Mark - dmc.markr@gmail.com
Project Link: https://github.com/PHmark/gs-news-app