NekodRider / test-site

Simple Web Server for Coding-Exam-Hosting based on Flask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test Site

Introduce

Developed for UniqueStudio Stayup test.

Based on Python3 Flask

uploads and test will be created automatically.

The server will scan the dir and show all the test file.

Upload File Type Limit is compress files like 7z, zip, or gz.

Upload File Size Limit is 256M and can be edited.

Usage

Using Docker-Compose

Build and Run.

docker-compose build && docker-compose up

Remeber to put .env under app folder with field ADMIN_PSWD.

Otherwise we cannot login to backend.

Also, for some reasons (related with redirecting, nginx and docker), the nginx will listen on 811 but not 80. We will look for solution to it.

Using just Flask or Gunicorn

Set Nginx File Limit to 1000M or customized. Default is 2M.

Clone it and install dependencies.

git clone https://github.com/NekodRider/test-site
cd test-site
# (OPTIONAL) git checkout semantic-theme
# (You may install dependencies by yourself)
pip3 install -r requirement.txt

Modify the port in run.py and the admin config in app/views.py.

then

python3 run.py

or using gunicorn

pip3 install gunicorn
gunicorn -w {WORKER_NUM} --bind {IP}:{PORT} run:app

About

Simple Web Server for Coding-Exam-Hosting based on Flask

License:MIT License


Languages

Language:JavaScript 98.4%Language:HTML 0.8%Language:Python 0.6%Language:CSS 0.1%Language:Dockerfile 0.0%