Commit 74565dd8 authored by tsukumi's avatar tsukumi

Change: update README.md

parent dee32088
......@@ -25,7 +25,7 @@ CORS_ALLOW=http://localhost:9000
GUEST_SESSIONS=10
# MongoDB Connection
MONGO_HOST=mongo
MONGO_HOST=localhost
MONGO_PORT=27017
MONGO_DB=tester
MONGO_USERNAME=root
......
### Docker
Follow the quickstart instructions in our docker repo's [README](https://github.com/shadowban-eu/docker#shadowbandev).
# Twitter ShadowBan Test (Backend)
### Install/Run
Frontend:
[tsukumijima/shadowban-eu-frontend](https://github.com/tsukumijima/shadowban-eu-frontend)
Backend (this repository):
[tsukumijima/shadowban-eu-backend](https://github.com/tsukumijima/shadowban-eu-backend)
## Setup
Run the following commands in order.
```bash
# Clone this repository
$ git@github.com:tsukumijima/shadowban-eu-frontend.git
$ cd shadowban-eu-backend
# Dependencies installation
$ pip install --no-cache-dir -r requirements.txt
# Copy .env.example to .env
$ cp .env.example .env
```
Run the api server with the following command.
By default, the API server is listening on port 9001.
```bash
$ git clone https://github.com/shadowban-eu/testing ./testing; cd $_
$ ./bin/install.sh
$ ./bin/docker-entry.sh .env.example # takes any .env file
# Specify the name of the .env file as an argument
$ ./docker-entry.sh .env
```
### Memory Profiling
Using [memory-profiler](https://pypi.org/project/memory-profiler/) to debug memory usage:
## Setup with Docker
Run the following commands in order.
```bash
# Clone this repository
$ git@github.com:tsukumijima/shadowban-eu-frontend.git
$ cd shadowban-eu-backend
# Copy .env.example to .env
$ cp .env.example .env
```
If you use Docker, you need to change `MONGO_HOST` in .env from `localhost` to `mongo` .
Please edit the .env file in an editor.
Run the api server with the following command.
By default, the API server is listening on port 9001.
```bash
# When env vars are already set
$ ./bin/docker-entry.sh mprof
# Otherwise, read from file
$ ./bin/docker-entry.sh .env.example mprof
# Passes remaining arguments to mprof (set interval to 5s)
$ ./bin/docker-entry.sh .env.example mprof -T 5
# The first time you run it, the container will be created automatically
$ docker-compose up -d
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment