From 1d32dfab31c2f8e85a4a56cc73e2140cec5e534b Mon Sep 17 00:00:00 2001 From: Igor Kuzmenkov Date: Fri, 12 Jul 2024 18:14:57 +0300 Subject: [PATCH 01/10] Copier automated commit for draft changes --- .idea/meetime.iml | 3 ++- backend/tests-start.sh | 7 ------- scripts/test-local.sh | 15 --------------- scripts/test.sh | 11 ----------- 4 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 backend/tests-start.sh delete mode 100644 scripts/test-local.sh delete mode 100644 scripts/test.sh diff --git a/.idea/meetime.iml b/.idea/meetime.iml index 2194de0..f99b0df 100644 --- a/.idea/meetime.iml +++ b/.idea/meetime.iml @@ -3,6 +3,7 @@ + @@ -11,4 +12,4 @@ - + \ No newline at end of file diff --git a/backend/tests-start.sh b/backend/tests-start.sh deleted file mode 100644 index e35150c..0000000 --- a/backend/tests-start.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/env bash -set -e -set -x - -python /app/app/tests_pre_start.py - -bash ./scripts/test.sh "$@" diff --git a/scripts/test-local.sh b/scripts/test-local.sh deleted file mode 100644 index 4c180f2..0000000 --- a/scripts/test-local.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env bash - -# Exit in case of error -set -e - -docker-compose down -v --remove-orphans # Remove possibly previous broken stacks left hanging after an error - -if [ $(uname -s) = "Linux" ]; then - echo "Remove __pycache__ files" - sudo find . -type d -name __pycache__ -exec rm -r {} \+ -fi - -docker-compose build -docker-compose up -d -docker-compose exec -T backend bash /app/tests-start.sh "$@" diff --git a/scripts/test.sh b/scripts/test.sh deleted file mode 100644 index 73c449a..0000000 --- a/scripts/test.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env sh - -# Exit in case of error -set -e -set -x - -docker compose build -docker compose down -v --remove-orphans # Remove possibly previous broken stacks left hanging after an error -docker compose up -d -docker compose exec -T backend bash /app/tests-start.sh "$@" -docker compose down -v --remove-orphans From 614b7028b36143b82fdc806d24a1bbe07edf1bf4 Mon Sep 17 00:00:00 2001 From: Igor Kuzmenkov Date: Fri, 12 Jul 2024 18:21:56 +0300 Subject: [PATCH 02/10] Stopped tracking env --- .copier/.copier-answers.yml.jinja | 1 - .copier/update_dotenv.py | 26 - .env | 38 - .gitignore | 1 + .idea/.gitignore | 8 - .idea/inspectionProfiles/Project_Default.xml | 2 +- .../inspectionProfiles/profiles_settings.xml | 2 +- .idea/meetime.iml | 7 +- .idea/misc.xml | 2 +- .idea/modules.xml | 2 +- .idea/ruff.xml | 2 +- .idea/vcs.xml | 2 +- .idea/workspace.xml | 4 + backend/Dockerfile | 4 +- backend/poetry.lock | 2018 ----------------- 15 files changed, 14 insertions(+), 2105 deletions(-) delete mode 100644 .copier/.copier-answers.yml.jinja delete mode 100644 .copier/update_dotenv.py delete mode 100644 .env delete mode 100644 .idea/.gitignore create mode 100644 .idea/workspace.xml delete mode 100644 backend/poetry.lock diff --git a/.copier/.copier-answers.yml.jinja b/.copier/.copier-answers.yml.jinja deleted file mode 100644 index 0028a23..0000000 --- a/.copier/.copier-answers.yml.jinja +++ /dev/null @@ -1 +0,0 @@ -{{ _copier_answers|to_json -}} diff --git a/.copier/update_dotenv.py b/.copier/update_dotenv.py deleted file mode 100644 index 6576885..0000000 --- a/.copier/update_dotenv.py +++ /dev/null @@ -1,26 +0,0 @@ -from pathlib import Path -import json - -# Update the .env file with the answers from the .copier-answers.yml file -# without using Jinja2 templates in the .env file, this way the code works as is -# without needing Copier, but if Copier is used, the .env file will be updated -root_path = Path(__file__).parent.parent -answers_path = Path(__file__).parent / ".copier-answers.yml" -answers = json.loads(answers_path.read_text()) -env_path = root_path / ".env" -env_content = env_path.read_text() -lines = [] -for line in env_content.splitlines(): - for key, value in answers.items(): - upper_key = key.upper() - if line.startswith(f"{upper_key}="): - if " " in value: - content = f"{upper_key}={value!r}" - else: - content = f"{upper_key}={value}" - new_line = line.replace(line, content) - lines.append(new_line) - break - else: - lines.append(line) -env_path.write_text("\n".join(lines)) diff --git a/.env b/.env deleted file mode 100644 index cd90c54..0000000 --- a/.env +++ /dev/null @@ -1,38 +0,0 @@ -# Domain -# This would be set to the production domain with an env var on deployment -DOMAIN=localhost - -# Environment: local, staging, production -ENVIRONMENT=local - -PROJECT_NAME="Full Stack FastAPI Project" -STACK_NAME=full-stack-fastapi-project - -# Backend -BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173,http://localhost.tiangolo.com" -SECRET_KEY=changethis -FIRST_SUPERUSER=admin@example.com -FIRST_SUPERUSER_PASSWORD=changethis -USERS_OPEN_REGISTRATION=False - -# Emails -SMTP_HOST= -SMTP_USER= -SMTP_PASSWORD= -EMAILS_FROM_EMAIL=info@example.com -SMTP_TLS=True -SMTP_SSL=False -SMTP_PORT=587 - -# Postgres -POSTGRES_SERVER=localhost -POSTGRES_PORT=5432 -POSTGRES_DB=app -POSTGRES_USER=postgres -POSTGRES_PASSWORD=changethis - -SENTRY_DSN= - -# Configure these with your own Docker registry images -DOCKER_IMAGE_BACKEND=backend -DOCKER_IMAGE_FRONTEND=frontend diff --git a/.gitignore b/.gitignore index 722d5e7..a5c8936 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .vscode +.env \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 1ba5447..282b05c 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -3,4 +3,4 @@