Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-eu-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-eu-backend
Commits
74565dd8
Commit
74565dd8
authored
Dec 06, 2021
by
tsukumi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change: update README.md
parent
dee32088
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
15 deletions
+45
-15
.env.example
.env.example
+1
-1
README.md
README.md
+44
-14
No files found.
.env.example
View file @
74565dd8
...
...
@@ -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
...
...
README.md
View file @
74565dd8
### 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
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment