diff --git a/cmds.cmd b/cmds.cmd new file mode 100644 index 0000000..a9deb1c --- /dev/null +++ b/cmds.cmd @@ -0,0 +1,50 @@ +# capture all library in requirement txt file +pip freeze | cut -d'=' -f1 > requirements_transform.txt +pipdeptree --freeze --warn silence | grep -E '^[a-zA-Z0-9\-_]+' | cut -d'=' -f1 > requirements.txt + +# capture library with version number +pipdeptree --freeze --warn silence | grep -E '^[a-zA-Z0-9\-_]+' > requirements.txt + +# for windows +pipdeptree --freeze --warn silence | findstr /R "^[a-zA-Z0-9\-_]" > requirements.txt + +#execute docker mongodb in container +docker run -d --name mongodb-container -p 27017:27017 mongo + +#execute docker mongodb in container with volume +docker compose down all && docker compose -f docker-compose.yml up -d --build + +#execute FastAPI server +uvicorn app.main:app --reload + +#Kill port in linux if occupied by VSCode +sudo lsof -i :8000 +kill -9 + +# to stop mongodb +net stop MongoDB + +#docker compose validation +docker-compose config + +#If the output doesn't show any errors, your file is valid. Then you can start the services: +docker-compose up --build + +#If you want to run the services in the background, you can use the -d flag: +docker compose up -d --build + +# -f is used for custom filename for docker compose +docker compose -f docker-compose.yml up -d --build + +docker run -it chatbot_backend-fastapi_application /bin/bash + +# This is test + +# Run the command to fetch the latest references from GitHub +git fetch --prune + +# Identify local branches not tracked on GitHub +git branch -vv | grep ': gone' | awk '{print $1}' + +# Run the following command to delete all untracked local branches +git branch -vv | grep ': gone' | awk '{print $1}' | xargs -r git branch -d \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9828314 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +fqdn +isoduration +jsonpointer +jupyter +pipdeptree +tinycss2 +uri-template +webcolors diff --git a/requirements_transform.txt b/requirements_transform.txt new file mode 100644 index 0000000..653269a --- /dev/null +++ b/requirements_transform.txt @@ -0,0 +1,97 @@ +anyio +argon2-cffi +argon2-cffi-bindings +arrow +asttokens +async-lru +attrs +babel +beautifulsoup4 +bleach +certifi +cffi +charset-normalizer +colorama +comm +debugpy +decorator +defusedxml +executing +fastjsonschema +fqdn +h11 +httpcore +httpx +idna +ipykernel +ipython +ipywidgets +isoduration +jedi +Jinja2 +json5 +jsonpointer +jsonschema +jsonschema-specifications +jupyter +jupyter-console +jupyter-events +jupyter-lsp +jupyter_client +jupyter_core +jupyter_server +jupyter_server_terminals +jupyterlab +jupyterlab_pygments +jupyterlab_server +jupyterlab_widgets +MarkupSafe +matplotlib-inline +mistune +nbclient +nbconvert +nbformat +nest-asyncio +notebook +notebook_shim +overrides +packaging +pandocfilters +parso +platformdirs +prometheus_client +prompt_toolkit +psutil +pure_eval +pycparser +Pygments +python-dateutil +python-json-logger +pywin32 +pywinpty +PyYAML +pyzmq +referencing +requests +rfc3339-validator +rfc3986-validator +rpds-py +Send2Trash +setuptools +six +sniffio +soupsieve +stack-data +terminado +tinycss2 +tornado +traitlets +types-python-dateutil +typing_extensions +uri-template +urllib3 +wcwidth +webcolors +webencodings +websocket-client +widgetsnbextension