feat: Use nixpacks as default build type for Easypanel

- Changed from Dockerfile to nixpacks (no Dockerfile needed)
- Astro projects automatically detected and built by nixpacks
- Simpler deployment, no Docker configuration required
This commit is contained in:
Kunthawat Greethong
2026-03-10 10:38:30 +07:00
parent 7524c29ce5
commit 719edd6681

View File

@@ -91,9 +91,8 @@ def make_request(endpoint, method="GET", data=None, token=None):
def create_service(project_name, service_name, token): def create_service(project_name, service_name, token):
"""Create Easypanel service."""
print(f"🚀 Creating service: {service_name}") print(f"🚀 Creating service: {service_name}")
data = {"json": {"projectName": project_name, "serviceName": service_name, "build": {"type": "dockerfile", "file": "Dockerfile"}}} data = {"json": {"projectName": project_name, "serviceName": service_name, "build": {"type": "nixpacks"}}}
result = make_request("services.app.createService", "POST", data, token) result = make_request("services.app.createService", "POST", data, token)
if result: if result:
print(f"✅ Service created: {service_name}") print(f"✅ Service created: {service_name}")
@@ -114,13 +113,12 @@ def update_git_source(project_name, service_name, git_url, branch="main", token=
return False return False
def update_build_type(project_name, service_name, token): def update_build_type(project_name, service_name, token, build_type="nixpacks"):
"""Set build type to Dockerfile.""" print(f"🔨 Setting build type to {build_type}...")
print(f"🔨 Setting build type to Dockerfile...") data = {"json": {"projectName": project_name, "serviceName": service_name, "build": {"type": build_type}}}
data = {"json": {"projectName": project_name, "serviceName": service_name, "build": {"type": "dockerfile", "file": "Dockerfile"}}}
result = make_request("services.app.updateBuild", "POST", data, token) result = make_request("services.app.updateBuild", "POST", data, token)
if result: if result:
print(f"✅ Build type set: dockerfile") print(f"✅ Build type set: {build_type}")
return True return True
print(f"⚠️ Could not update build type (may already be set)") print(f"⚠️ Could not update build type (may already be set)")
return True return True