chore: add READMEs for clarity
This commit is contained in:
@@ -2,9 +2,14 @@ import secrets
|
||||
import random
|
||||
from pathlib import Path
|
||||
|
||||
# === Prompt user input === #
|
||||
react_api_url = input("🔧 Enter the REACT_APP_API_BASE_URL (e.g. https://minxa.wtf): ").strip()
|
||||
allow_origins = input("🔒 Enter allowed CORS origins for the backend comma-separated (e.g. https://minxa.lol,https://minxo.lol): ").strip()
|
||||
# === Prompt user input with defaults === #
|
||||
react_api_url = input("🔧 Enter the REACT_APP_API_BASE_URL (default: http://localhost:8000): ").strip()
|
||||
if not react_api_url:
|
||||
react_api_url = "http://localhost:8000"
|
||||
|
||||
allow_origins = input("🔒 Enter allowed CORS origins (comma-separated) (default: http://localhost:3000,http://127.0.0.1:3000): ").strip()
|
||||
if not allow_origins:
|
||||
allow_origins = "http://localhost:3000,http://127.0.0.1:3000"
|
||||
|
||||
# Ask for environment and validate input
|
||||
valid_envs = ["dev", "stage", "prod"]
|
||||
@@ -63,7 +68,7 @@ compose_yml = f"""services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", {db_user}, "-d", {db_name}]
|
||||
test: ["CMD", "pg_isready", "-U", "{db_user}", "-d", "{db_name}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -108,4 +113,4 @@ compose_path.write_text(compose_yml)
|
||||
print(f"✅ docker-compose.generated.yml written")
|
||||
|
||||
print("\n🎉 All files generated! Run your stack with:\n")
|
||||
print("docker compose -f docker-compose.generated.yml up --build")
|
||||
print(" docker compose -f docker-compose.generated.yml up --build -d")
|
||||
|
||||
Reference in New Issue
Block a user