Textometr provides information about complexity level and other pedagogical statistics for any given text in Russian.
-
Run
docker-compose -f docker-compose.dev.yml up
-
Go to
backend
folder -
Create virtual environment
python3 -m venv env
-
Activate venv
source env/bin/activate
-
Install packages
pip install -r requirements.txt python -m nltk.downloader punkt
-
Run tests local or inside Docker container
python3 -m unittest
-
Run using Uvicorn
cd app uvicorn app.main:app --reload
-
Deactivate venv
deactivate
- Generate icons
cd work npx vue-pwa-asset-generator -a logo.svg -o output
-
Install Artillery
npm install -g artillery
-
Run load test
cd load-tests artillery run artillery-load-test.yaml
-
Build image for frontend
cd frontend # from the project directory docker build -t 1eshkin/textometr-frontend:x.x.x .
-
Push frontend image to the Docker Hub
docker push 1eshkin/textometr-frontend:x.x.x
-
Build image for backend
cd backend # from the project directory docker build -t 1eshkin/textometr-backend:x.x.x .
-
Push backend image to the Docker Hub
docker push 1eshkin/textometr-backend:x.x.x
-
Copy
docker-compose.yml
to thetextometr
folder on remote server -
Create Docker Swarm on the remote server
docker swarm init
-
Run Docker Compose script for building images
docker-compose up
Then Ctrl+C to shutdown
-
Deploy services to Docker Swarm
docker stack deploy --compose-file docker-compose.yml textometr
-
Watch running services
docker service ls # to view active replicas docker stats # to monitor resource usage
-
Copy
docker-compose.yml
to thetextometr
folder on remote server -
Deploy app stack in Docker Swarm
cd textometr docker stack deploy --compose-file docker-compose.yml textometr
-
Reload nginx config
docker container exec <container> nginx -s reload
-
View service logs
docker service ps --no-trunc textometr_backend