Skip to content

Commit 46b87b2

Browse files
committed
Move example .env file to the root directory instead of inside src
1 parent 2ef8190 commit 46b87b2

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
2-
"""
3-
FastAPI Boilerplate Setup Script
2+
"""FastAPI Boilerplate Setup Script.
43
54
Automates copying the correct configuration files for different deployment scenarios.
65
"""
@@ -29,7 +28,7 @@
2928

3029

3130
def show_help():
32-
"""Display help information"""
31+
"""Display help information."""
3332
print("FastAPI Boilerplate Setup")
3433
print("=" * 25)
3534
print()
@@ -47,7 +46,7 @@ def show_help():
4746

4847

4948
def copy_files(deployment_type: str):
50-
"""Copy configuration files for the specified deployment type"""
49+
"""Copy configuration files for the specified deployment type."""
5150
if deployment_type not in DEPLOYMENTS:
5251
print(f"❌ Unknown deployment type: {deployment_type}")
5352
print()
@@ -68,7 +67,7 @@ def copy_files(deployment_type: str):
6867
files_to_copy = [
6968
("Dockerfile", "Dockerfile"),
7069
("docker-compose.yml", "docker-compose.yml"),
71-
(".env.example", "src/.env"),
70+
(".env.example", ".env"),
7271
]
7372

7473
success = True
@@ -115,7 +114,7 @@ def copy_files(deployment_type: str):
115114

116115

117116
def interactive_setup():
118-
"""Interactive setup when no arguments provided"""
117+
"""Interactive setup when no arguments provided."""
119118
print("FastAPI Boilerplate Setup")
120119
print("=" * 25)
121120
print()
@@ -152,7 +151,7 @@ def interactive_setup():
152151

153152

154153
def main():
155-
"""Main entry point"""
154+
"""Main entry point."""
156155
if len(sys.argv) > 1 and sys.argv[1] in ["-h", "--help", "help"]:
157156
show_help()
158157
return

src/app/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class Settings(
166166
CORSSettings,
167167
):
168168
model_config = SettingsConfigDict(
169-
env_file=os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", ".env"),
169+
env_file=os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", ".env"),
170170
env_file_encoding="utf-8",
171171
case_sensitive=True,
172172
extra="ignore",

0 commit comments

Comments
 (0)