From d537a3993cb86b184e2cf30122e32b1f120769fe Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Sun, 15 Nov 2020 22:13:36 +0400 Subject: [PATCH] Fixed .gitignore. Description: - Fixed .gitignore; - Added .env file in repo. Signed-off-by: Pavel Kirilin <win10@list.ru> --- .gitignore | 1 - .../{{cookiecutter.project_name}}/envs/.env | 17 +++++++++++++++++ pyproject.toml | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 fastapi_template/template/{{cookiecutter.project_name}}/envs/.env diff --git a/.gitignore b/.gitignore index 2b83952..6f47b3e 100644 --- a/.gitignore +++ b/.gitignore @@ -107,7 +107,6 @@ celerybeat.pid *.sage.py # Environments -.env .venv env/ venv/ diff --git a/fastapi_template/template/{{cookiecutter.project_name}}/envs/.env b/fastapi_template/template/{{cookiecutter.project_name}}/envs/.env new file mode 100644 index 0000000..4c2e415 --- /dev/null +++ b/fastapi_template/template/{{cookiecutter.project_name}}/envs/.env @@ -0,0 +1,17 @@ +LOG_LEVEL=Debug +POSTGRES_HOST=db +POSTGRES_PORT=5432 +POSTGRES_DB={{cookiecutter.project_name}}_db +POSTGRES_USER={{cookiecutter.project_name}} +POSTGRES_PASSWORD={{cookiecutter.postgres_password}} +{% if cookiecutter.add_redis == "True" -%} +REDIS_PASSWORD={{cookiecutter.redis_password}} +REDIS_HOST=redis +REDIS_PORT=6379 +{% endif %} +{% if cookiecutter.add_scheduler == "True" -%} +SCHEDULE_TIMER=20 +{% endif %} +{% if cookiecutter.add_elastic_search == "True" -%} +ELASTIC_HOST=http://es:9200 +{% endif %} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1732da2..f83355f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fastapi_template" -version = "1.1.8" +version = "1.2.0" description = "Feature-rich robust FastAPI template" authors = ["Pavel Kirilin <win10@list.ru>"] packages = [ @@ -26,7 +26,7 @@ pygit2 = "^1.4.0" [tool.poetry.dev-dependencies] [tool.poetry.scripts] -fastapi_template = "fastapi_template:main" +fastapi_template = "fastapi_template.main:main" [build-system] requires = ["poetry-core>=1.0.0"] -- GitLab