Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .circleci/config.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .gitmodules
100644 → 100755
Empty file.
Empty file modified .pylintrc
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified Makefile.template
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Фемида | Система распознавания тестов ЭМШ


# TODO feriat
В марте 2020 feriat@ переписал фронтенд, чтобы он работал **behind traefik proxy**. Инструкция по установке TODO.

# Getting Started

* Pull the repository
Expand Down
48 changes: 45 additions & 3 deletions docker-compose.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
version: '3'

networks:
web:
external: true
internal:
external: false

services:
mongodb:
image: mongo:latest
Expand All @@ -8,6 +14,10 @@ services:
- data:/data/db
- ./mongo/mongod.conf:/etc/mongo/mongod.conf
command: mongod --config /etc/mongo/mongod.conf
networks:
- internal
labels:
- traefik.enable=false

mongo-express:
image: mongo-express
Expand All @@ -22,6 +32,13 @@ services:
- 8081:8081
depends_on:
- mongodb
networks:
- internal
- web
labels:
- traefik.backend=mongo-express
- "traefik.frontend.rule=Host:femida.emsch.ru;PathPrefix:/mongo"
- traefik.docker.network=web

frontend:
build:
Expand All @@ -34,13 +51,22 @@ services:
- secret
depends_on:
- mongodb
ports:
- 80:80
- 443:443
# ports:
# - 80
# - 80:80
# - 443:443
volumes:
- media:/media/
- ./databases/:/app/databases/
- ./ssl/:/etc/nginx/ssl/
networks:
- internal
- web
labels:
- traefik.backend=femida
- traefik.frontend.rule=Host:femida.emsch.ru
- traefik.docker.network=web
- traefik.port=80

ocr_producer:
build:
Expand All @@ -54,6 +80,10 @@ services:
command: run_producer --root=/var/femida_detect --scan-first --host=mongodb
depends_on:
- mongodb
networks:
- internal
labels:
- traefik.enable=false

pdf_consumer:
build:
Expand All @@ -67,6 +97,10 @@ services:
command: run_pdf_consumer --root=/var/femida_detect --host=mongodb
depends_on:
- ocr_producer
networks:
- internal
labels:
- traefik.enable=false

answers_consumer:
build:
Expand All @@ -81,6 +115,10 @@ services:
command: run_answers_consumer --root=/var/femida_detect --host=mongodb --model-path=/model/model.t7
depends_on:
- pdf_consumer
networks:
- internal
labels:
- traefik.enable=false

status_updater:
build:
Expand All @@ -93,6 +131,10 @@ services:
command: run_status_updater --root=/var/femida_detect --host=mongodb
depends_on:
- answers_consumer
networks:
- internal
labels:
- traefik.enable=false

volumes:
data:
Expand Down
Empty file modified envfile.template
100644 → 100755
Empty file.
Empty file modified frontend/.dockerignore
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions frontend/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ COPY nginx/femida.conf.template /etc/nginx/conf.d/nginx.conf.template
COPY nginx/ssl.conf /etc/nginx/ssl.conf
COPY nginx/drop.conf /etc/nginx/drop.conf
EXPOSE 80 443

Empty file modified frontend/app/__init__.py
100644 → 100755
Empty file.
Empty file modified frontend/app/configure_mongo.py
100644 → 100755
Empty file.
Empty file modified frontend/app/configure_nginx.py
100644 → 100755
Empty file.
Empty file modified frontend/app/css/autocomplete.css
100644 → 100755
Empty file.
Empty file modified frontend/app/css/form.css
100644 → 100755
Empty file.
Empty file modified frontend/app/database.py
100644 → 100755
Empty file.
Empty file modified frontend/app/export.py
100644 → 100755
Empty file.
Empty file modified frontend/app/favicon.ico
100644 → 100755
Empty file.
Empty file modified frontend/app/js/autocomplete.js
100644 → 100755
Empty file.
Empty file modified frontend/app/js/form.js
100644 → 100755
Empty file.
Empty file modified frontend/app/main.py
100644 → 100755
Empty file.
Empty file modified frontend/app/prestart.sh
100644 → 100755
Empty file.
Empty file modified frontend/app/requirements-frontend.txt
100644 → 100755
Empty file.
Empty file modified frontend/app/robots.txt
100644 → 100755
Empty file.
Empty file modified frontend/app/static/mat-excel-template.xlsx
100644 → 100755
Empty file.
Empty file modified frontend/app/static/mat-pdf-30q.pdf
100644 → 100755
Empty file.
Empty file modified frontend/app/static/old-mat-excel.xlsx
100644 → 100755
Empty file.
Empty file modified frontend/app/static/old-ot-template.xlsx
100644 → 100755
Empty file.
Empty file modified frontend/app/static/ot-excel-template.xlsx
100644 → 100755
Empty file.
Empty file modified frontend/app/static/ot-pdf-40q.pdf
100644 → 100755
Empty file.
Empty file modified frontend/app/templates/form.html
100644 → 100755
Empty file.
Empty file modified frontend/app/templates/leaderboard.html
100644 → 100755
Empty file.
Empty file modified frontend/app/templates/monitor.html
100644 → 100755
Empty file.
Empty file modified frontend/app/templates/pdf.html
100644 → 100755
Empty file.
Empty file modified frontend/app/uwsgi.ini
100644 → 100755
Empty file.
Empty file modified frontend/nginx/drop.conf
100644 → 100755
Empty file.
12 changes: 6 additions & 6 deletions frontend/nginx/femida.conf.template
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ server {
uwsgi_pass unix:///tmp/uwsgi.sock;
}

location /mongo {
proxy_pass http://mongo-express:8081;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
}
}
# location /mongo {
# proxy_pass http://mongo-express:8081;
# proxy_set_header Host $host;
# proxy_set_header X-Real_IP $remote_addr;
# }
}
Empty file modified frontend/nginx/ssl.conf
100644 → 100755
Empty file.
Empty file modified mongo/mongod.conf
100644 → 100755
Empty file.
Empty file modified python/.dockerignore
100644 → 100755
Empty file.
Empty file modified python/Dockerfile
100644 → 100755
Empty file.
Empty file modified python/bin/run_pdf_consumer
100644 → 100755
Empty file.
Empty file modified python/femida_detect/__init__.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/detect/__init__.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/detect/eval.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/detect/loader.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/detect/model.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/detect/utils.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/imgparse.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/pdf2img.py
100644 → 100755
Empty file.
Empty file modified python/femida_detect/utils.py
100644 → 100755
Empty file.
Empty file modified python/requirements-dev.txt
100644 → 100755
Empty file.
Empty file modified python/requirements.txt
100644 → 100755
Empty file.
Empty file modified python/setup.cfg
100644 → 100755
Empty file.
Empty file modified python/setup.py
100644 → 100755
Empty file.
Empty file modified python/tests/conftest.py
100644 → 100755
Empty file.
Empty file modified python/tests/data/newM.pdf
100644 → 100755
Empty file.
Empty file modified python/tests/data/newM.pdf.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified python/tests/data/newM.pdf.jpg.cropped.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified python/tests/data/newOT.pdf
100644 → 100755
Empty file.
Empty file modified python/tests/data/newOT.pdf.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified python/tests/data/newOT.pdf.jpg.cropped.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified python/tests/test_model.py
100644 → 100755
Empty file.
Empty file modified python/tests/test_parse_image.py
100644 → 100755
Empty file.
Empty file modified python/tests/test_pdf2img.py
100644 → 100755
Empty file.
Empty file modified secret.template
100644 → 100755
Empty file.