Created initial project files
This commit is contained in:
2
.env.example
Normal file
2
.env.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Project Configuration
|
||||||
|
APP_NAME="${REPO_NAME}"
|
||||||
3
.gitea/template
Normal file
3
.gitea/template
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
src/.env
|
||||||
|
src/main.py
|
||||||
|
README.md
|
||||||
17
launch.sh
Executable file
17
launch.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copy .env if it doesn't exist
|
||||||
|
if [ ! -f .env ]; then
|
||||||
|
cp .env.example src/.env
|
||||||
|
echo ".env file created from template."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setup Virtual Environment
|
||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# Run the app
|
||||||
|
python src/main.py
|
||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
python_dotenv
|
||||||
14
src/main.py
Normal file
14
src/main.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app_name = os.getenv("APP_NAME", "DefaultApp")
|
||||||
|
print(f"Launching {app_name}...")
|
||||||
|
|
||||||
|
# Example of creating a subfolder for misc files
|
||||||
|
config_dir = Path("storage/configs")
|
||||||
|
config_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
print(f"Storage directory ready at: {config_dir.absolute()}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user