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):
"""Create Easypanel service."""
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)
if result:
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
def update_build_type(project_name, service_name, token):
"""Set build type to Dockerfile."""
print(f"🔨 Setting build type to Dockerfile...")
data = {"json": {"projectName": project_name, "serviceName": service_name, "build": {"type": "dockerfile", "file": "Dockerfile"}}}
def update_build_type(project_name, service_name, token, build_type="nixpacks"):
print(f"🔨 Setting build type to {build_type}...")
data = {"json": {"projectName": project_name, "serviceName": service_name, "build": {"type": build_type}}}
result = make_request("services.app.updateBuild", "POST", data, token)
if result:
print(f"✅ Build type set: dockerfile")
print(f"✅ Build type set: {build_type}")
return True
print(f"⚠️ Could not update build type (may already be set)")
return True