diff --git a/linux/nikita/Flasko_web_site/.dockerignore b/linux/nikita/Flasko_web_site/.dockerignore
new file mode 100644
index 0000000..99ed102
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/.dockerignore
@@ -0,0 +1,2 @@
+.mongodata
+data/**
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/.gitignore b/linux/nikita/Flasko_web_site/.gitignore
new file mode 100644
index 0000000..76174ee
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/.gitignore
@@ -0,0 +1,161 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# .python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# poetry
+# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
+# This is especially recommended for binary packages to ensure reproducibility, and is more
+# commonly ignored for libraries.
+# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
+#poetry.lock
+
+# pdm
+# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
+#pdm.lock
+# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
+# in version control.
+# https://pdm.fming.dev/#use-with-ide
+.pdm.toml
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
+# PyCharm
+# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
+# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
+# and can be added to the global gitignore or merged into this file. For a more nuclear
+# option (not recommended) you can uncomment the following to ignore the entire idea folder.
+#.idea/
+.mongodata
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/Dockerfile b/linux/nikita/Flasko_web_site/Dockerfile
new file mode 100644
index 0000000..b332a40
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/Dockerfile
@@ -0,0 +1,19 @@
+# start by pulling the python image
+FROM python:3.8-alpine
+
+# copy every content from the local file to the image
+COPY . /app
+
+# copy the requirements file into the image
+COPY ./requirements.txt /app/requirements.txt
+
+WORKDIR /./app
+# install the dependencies and packages in the requirements file
+RUN pip install -r requirements.txt
+
+# configure the container to run in an executed manner
+ENTRYPOINT [ "python" ]
+
+EXPOSE 5000
+
+CMD ["main.py"]
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/app/conf.d/app.conf b/linux/nikita/Flasko_web_site/app/conf.d/app.conf
new file mode 100644
index 0000000..1659023
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/app/conf.d/app.conf
@@ -0,0 +1,11 @@
+upstream backend {
+ server app:5000;
+}
+
+server {
+ listen 80;
+
+ location / {
+ proxy_pass http://backend;
+ }
+}
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/docker-compose.yaml b/linux/nikita/Flasko_web_site/docker-compose.yaml
new file mode 100644
index 0000000..d7440d7
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/docker-compose.yaml
@@ -0,0 +1,40 @@
+version: "3.8"
+services:
+ #nginx service
+ #web:
+ # container_name: "web"
+ # image: nginx:alpine
+ # depends_on:
+ # - app
+ # ports:
+ # - "8080:80"
+ # volumes:
+ # - ./app/conf.d:/etc/nginx/conf.d
+ # networks:
+ # - custom
+ app:
+ container_name: "app"
+ image: myapp/site:1.6
+ environment:
+ - MONGODB_URL=mongodb://mongo_db/
+ build:
+ context: .
+ dockerfile: Dockerfile
+ ports:
+ - 8080:5000
+ networks:
+ - custom
+ depends_on:
+ - mongo_db
+ mongo_db:
+ image: mongo
+ container_name: "mongo_db"
+ ports:
+ - 27017:27017
+ networks:
+ - custom
+ volumes:
+ - ./data/db/.mongodata:/data/db
+networks:
+ custom:
+ driver: bridge
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/main.py b/linux/nikita/Flasko_web_site/main.py
new file mode 100644
index 0000000..0c0068b
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/main.py
@@ -0,0 +1,12 @@
+from website import create_app
+from flask import Flask, render_template
+
+app = create_app()
+
+@app.route('/')
+def home():
+ return render_template('welcome.html')
+
+
+if __name__ == "__main__":
+ app.run(debug=True, host="0.0.0.0")
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/requirements.txt b/linux/nikita/Flasko_web_site/requirements.txt
new file mode 100644
index 0000000..c24f8f4
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/requirements.txt
@@ -0,0 +1,5 @@
+pymongo[srv]
+flask
+envparse
+mongomock
+unittest
diff --git a/linux/nikita/Flasko_web_site/test_app.py b/linux/nikita/Flasko_web_site/test_app.py
new file mode 100644
index 0000000..bcc1787
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/test_app.py
@@ -0,0 +1,57 @@
+try:
+ from main import app
+ import unittest
+ import mongomock
+
+except Exception as e:
+ print("Some Modules are Missing {}".format(e))
+
+
+class TestApp(unittest.TestCase):
+ def test_index_status(self):
+ client = app.test_client(self)
+ #response_1 = client.get("/home")
+ response_2 = client.get("/sign-up")
+ response_3 = client.get("/login")
+ response_4 = client.get("/logout")
+
+ #statuscode_1 = response_1.status_code
+ statuscode_2 = response_2.status_code
+ statuscode_3 = response_3.status_code
+ statuscode_4 = response_4.status_code
+
+ #self.assertEqual(statuscode_1, 200)
+ self.assertEqual(statuscode_2, 200)
+ self.assertEqual(statuscode_3, 200)
+ self.assertEqual(statuscode_4, 302)
+
+ def test_index_content(self):
+ client = app.test_client(self)
+ response = client.get("/login")
+
+ self.assertTrue(b'
Login' in response.data)
+ self.assertTrue(b'
Login
' in response.data)
+ self.assertTrue(b'' in response.data)
+ self.assertTrue(b'' in response.data)
+
+
+
+class TestMongoDb(unittest.TestCase):
+ def setUp(self):
+ self.client = mongomock.MongoClient()
+ self.db = self.client['test_database']
+ self.collection = self.db['test_collection']
+ self.data = ({"email": "test@mail.com", "first_name": "tester", "password1": "testpassword", "password2": "testpassword"})
+
+ def test_insert_and_find(self):
+ self.collection.insert_one(self.data)
+ doc = self.collection.find_one({"email": "test@mail.com"})
+
+ self.assertIsNotNone(doc)
+ self.assertEqual(doc['email'], "test@mail.com")
+ self.assertEqual(doc['password1'], "testpassword")
+ self.assertEqual(doc['password2'], "testpassword")
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/linux/nikita/Flasko_web_site/testing/__init__.py b/linux/nikita/Flasko_web_site/testing/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/linux/nikita/Flasko_web_site/testing/conftest.py b/linux/nikita/Flasko_web_site/testing/conftest.py
new file mode 100644
index 0000000..61748f2
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/testing/conftest.py
@@ -0,0 +1,36 @@
+import pytest
+from pymongo import MongoClient
+from website import create_app
+
+@pytest.fixture(scope="module")
+def mongo_client():
+ client = MongoClient("mongodb://localhost:27017")
+ yield client
+ client.close()
+
+
+@pytest.fixture(scope="module")
+def client():
+ app = create_app()
+ with app.test_client() as client:
+ yield client
+
+@pytest.fixture(scope="module")
+def test_dbname(mongo_client):
+ dbname = mongo_client['user_auth']
+ yield dbname
+ mongo_client.drop_database("user_auth")
+
+
+@pytest.fixture(scope="module")
+def test_dbname2(mongo_client):
+ dbname2 = mongo_client['user_note']
+ yield dbname2
+ mongo_client.drop_database("user_note")
+
+
+@pytest.fixture
+def math_func(x = 10, y = 5):
+ return (x + y)
+
+
diff --git a/linux/nikita/Flasko_web_site/testing/pytest.ini b/linux/nikita/Flasko_web_site/testing/pytest.ini
new file mode 100644
index 0000000..213f593
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/testing/pytest.ini
@@ -0,0 +1,9 @@
+[pytest]
+python_files=test_project.py
+markers =
+ connection: mark a test as a connection
+ content: mark a test as a content
+ db: mark a test as a db
+ test: mark a test as a test
+ resgitration: mark a test as a resgitration
+ login: mark a test as a login
\ No newline at end of file
diff --git a/linux/nikita/Flasko_web_site/testing/test_project.py b/linux/nikita/Flasko_web_site/testing/test_project.py
new file mode 100644
index 0000000..aa972da
--- /dev/null
+++ b/linux/nikita/Flasko_web_site/testing/test_project.py
@@ -0,0 +1,103 @@
+from pymongo import MongoClient
+import pytest
+
+
+@pytest.mark.connection
+@pytest.mark.timeout(5)
+def test_connection():
+ client = MongoClient("mongodb://localhost:27017")
+ assert client.admin.command("ping")["ok"] > 0
+
+#First test should always run with '-x' option.
+@pytest.mark.connection
+def test_login(client):
+ response = client.get("/login")
+ assert response.status_code == 200
+
+
+@pytest.mark.connection
+def test_home(client):
+ response = client.get("/home")
+ assert response.status_code == 200
+
+
+@pytest.mark.connection
+def test_sign_up(client):
+ response = client.get("/sign-up")
+ assert response.status_code == 200
+
+
+@pytest.mark.content
+def test_title(client):
+ response = client.get("/home")
+ assert b"Home" in response.data
+
+
+@pytest.mark.content
+def test_textarea(client):
+ response = client.get("/home")
+ assert b'' in response.data
+
+
+@pytest.mark.content
+def test_h1(client):
+ response = client.get("/home")
+ assert b"