sd
This commit is contained in:
@@ -7,7 +7,7 @@ POSTGRES_DB=adctrl
|
||||
SECRET_TOKEN=asdasdasd
|
||||
|
||||
# Services Directory (where managed services will be stored)
|
||||
SERVICES_DIR=./services
|
||||
SERVICES_DIR=/root/services
|
||||
|
||||
# Scoreboard Configuration
|
||||
SCOREBOARD_WS_URL=ws://10.60.0.1:8080/api/events
|
||||
|
||||
@@ -110,10 +110,14 @@ async def create_service(service: ServiceCreate):
|
||||
if not os.path.exists(service_path):
|
||||
raise HTTPException(status_code=404, detail=f"Service path not found: {service_path}")
|
||||
|
||||
# Check if docker-compose.yml exists
|
||||
# Check if docker-compose file exists (yml or yaml)
|
||||
compose_file = os.path.join(service_path, "docker-compose.yml")
|
||||
if not os.path.exists(compose_file):
|
||||
raise HTTPException(status_code=404, detail=f"docker-compose.yml not found in {service_path}")
|
||||
compose_file = os.path.join(service_path, "docker-compose.yaml")
|
||||
if not os.path.exists(compose_file):
|
||||
compose_file = os.path.join(service_path, "compose.yml")
|
||||
if not os.path.exists(compose_file):
|
||||
raise HTTPException(status_code=404, detail=f"docker-compose file not found in {service_path}")
|
||||
|
||||
service_id = await conn.fetchval(
|
||||
"INSERT INTO services (name, path, git_url, status) VALUES ($1, $2, $3, $4) RETURNING id",
|
||||
|
||||
Reference in New Issue
Block a user