diff --git a/.circleci/config.yml b/.circleci/config.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/.pylintrc b/.pylintrc old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/Makefile.template b/Makefile.template old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 09a164d..8ceb0de --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Фемида | Система распознавания тестов ЭМШ +# TODO feriat +В марте 2020 feriat@ переписал фронтенд, чтобы он работал **behind traefik proxy**. Инструкция по установке TODO. + # Getting Started * Pull the repository diff --git a/docker-compose.yaml b/docker-compose.yaml old mode 100644 new mode 100755 index 743304f..80fc492 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,11 @@ version: '3' +networks: + web: + external: true + internal: + external: false + services: mongodb: image: mongo:latest @@ -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 @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: diff --git a/envfile.template b/envfile.template old mode 100644 new mode 100755 diff --git a/frontend/.dockerignore b/frontend/.dockerignore old mode 100644 new mode 100755 diff --git a/frontend/Dockerfile b/frontend/Dockerfile old mode 100644 new mode 100755 index 1b85810..933a3b2 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -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 + diff --git a/frontend/app/__init__.py b/frontend/app/__init__.py old mode 100644 new mode 100755 diff --git a/frontend/app/configure_mongo.py b/frontend/app/configure_mongo.py old mode 100644 new mode 100755 diff --git a/frontend/app/configure_nginx.py b/frontend/app/configure_nginx.py old mode 100644 new mode 100755 diff --git a/frontend/app/css/autocomplete.css b/frontend/app/css/autocomplete.css old mode 100644 new mode 100755 diff --git a/frontend/app/css/form.css b/frontend/app/css/form.css old mode 100644 new mode 100755 diff --git a/frontend/app/database.py b/frontend/app/database.py old mode 100644 new mode 100755 diff --git a/frontend/app/export.py b/frontend/app/export.py old mode 100644 new mode 100755 diff --git a/frontend/app/favicon.ico b/frontend/app/favicon.ico old mode 100644 new mode 100755 diff --git a/frontend/app/js/autocomplete.js b/frontend/app/js/autocomplete.js old mode 100644 new mode 100755 diff --git a/frontend/app/js/form.js b/frontend/app/js/form.js old mode 100644 new mode 100755 diff --git a/frontend/app/main.py b/frontend/app/main.py old mode 100644 new mode 100755 diff --git a/frontend/app/prestart.sh b/frontend/app/prestart.sh old mode 100644 new mode 100755 diff --git a/frontend/app/requirements-frontend.txt b/frontend/app/requirements-frontend.txt old mode 100644 new mode 100755 diff --git a/frontend/app/robots.txt b/frontend/app/robots.txt old mode 100644 new mode 100755 diff --git a/frontend/app/static/mat-excel-template.xlsx b/frontend/app/static/mat-excel-template.xlsx old mode 100644 new mode 100755 diff --git a/frontend/app/static/mat-pdf-30q.pdf b/frontend/app/static/mat-pdf-30q.pdf old mode 100644 new mode 100755 diff --git a/frontend/app/static/old-mat-excel.xlsx b/frontend/app/static/old-mat-excel.xlsx old mode 100644 new mode 100755 diff --git a/frontend/app/static/old-ot-template.xlsx b/frontend/app/static/old-ot-template.xlsx old mode 100644 new mode 100755 diff --git a/frontend/app/static/ot-excel-template.xlsx b/frontend/app/static/ot-excel-template.xlsx old mode 100644 new mode 100755 diff --git a/frontend/app/static/ot-pdf-40q.pdf b/frontend/app/static/ot-pdf-40q.pdf old mode 100644 new mode 100755 diff --git a/frontend/app/templates/form.html b/frontend/app/templates/form.html old mode 100644 new mode 100755 diff --git a/frontend/app/templates/leaderboard.html b/frontend/app/templates/leaderboard.html old mode 100644 new mode 100755 diff --git a/frontend/app/templates/monitor.html b/frontend/app/templates/monitor.html old mode 100644 new mode 100755 diff --git a/frontend/app/templates/pdf.html b/frontend/app/templates/pdf.html old mode 100644 new mode 100755 diff --git a/frontend/app/uwsgi.ini b/frontend/app/uwsgi.ini old mode 100644 new mode 100755 diff --git a/frontend/nginx/drop.conf b/frontend/nginx/drop.conf old mode 100644 new mode 100755 diff --git a/frontend/nginx/femida.conf.template b/frontend/nginx/femida.conf.template old mode 100644 new mode 100755 index 21a2a26..df10b66 --- a/frontend/nginx/femida.conf.template +++ b/frontend/nginx/femida.conf.template @@ -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; - } -} \ No newline at end of file +# location /mongo { +# proxy_pass http://mongo-express:8081; +# proxy_set_header Host $host; +# proxy_set_header X-Real_IP $remote_addr; +# } +} diff --git a/frontend/nginx/ssl.conf b/frontend/nginx/ssl.conf old mode 100644 new mode 100755 diff --git a/mongo/mongod.conf b/mongo/mongod.conf old mode 100644 new mode 100755 diff --git a/python/.dockerignore b/python/.dockerignore old mode 100644 new mode 100755 diff --git a/python/Dockerfile b/python/Dockerfile old mode 100644 new mode 100755 diff --git a/python/bin/run_pdf_consumer b/python/bin/run_pdf_consumer old mode 100644 new mode 100755 diff --git a/python/femida_detect/__init__.py b/python/femida_detect/__init__.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/detect/__init__.py b/python/femida_detect/detect/__init__.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/detect/eval.py b/python/femida_detect/detect/eval.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/detect/loader.py b/python/femida_detect/detect/loader.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/detect/model.py b/python/femida_detect/detect/model.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/detect/utils.py b/python/femida_detect/detect/utils.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/imgparse.py b/python/femida_detect/imgparse.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/pdf2img.py b/python/femida_detect/pdf2img.py old mode 100644 new mode 100755 diff --git a/python/femida_detect/utils.py b/python/femida_detect/utils.py old mode 100644 new mode 100755 diff --git a/python/requirements-dev.txt b/python/requirements-dev.txt old mode 100644 new mode 100755 diff --git a/python/requirements.txt b/python/requirements.txt old mode 100644 new mode 100755 diff --git a/python/setup.cfg b/python/setup.cfg old mode 100644 new mode 100755 diff --git a/python/setup.py b/python/setup.py old mode 100644 new mode 100755 diff --git a/python/tests/conftest.py b/python/tests/conftest.py old mode 100644 new mode 100755 diff --git a/python/tests/data/newM.pdf b/python/tests/data/newM.pdf old mode 100644 new mode 100755 diff --git a/python/tests/data/newM.pdf.jpg b/python/tests/data/newM.pdf.jpg old mode 100644 new mode 100755 diff --git a/python/tests/data/newM.pdf.jpg.cropped.jpg b/python/tests/data/newM.pdf.jpg.cropped.jpg old mode 100644 new mode 100755 diff --git a/python/tests/data/newOT.pdf b/python/tests/data/newOT.pdf old mode 100644 new mode 100755 diff --git a/python/tests/data/newOT.pdf.jpg b/python/tests/data/newOT.pdf.jpg old mode 100644 new mode 100755 diff --git a/python/tests/data/newOT.pdf.jpg.cropped.jpg b/python/tests/data/newOT.pdf.jpg.cropped.jpg old mode 100644 new mode 100755 diff --git a/python/tests/test_model.py b/python/tests/test_model.py old mode 100644 new mode 100755 diff --git a/python/tests/test_parse_image.py b/python/tests/test_parse_image.py old mode 100644 new mode 100755 diff --git a/python/tests/test_pdf2img.py b/python/tests/test_pdf2img.py old mode 100644 new mode 100755 diff --git a/secret.template b/secret.template old mode 100644 new mode 100755