web: Prepare containers

This commit is contained in:
2025-11-11 14:46:16 -06:00
parent 18ab2c40ba
commit 4c34931b34
8 changed files with 64 additions and 14 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env julia
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment
# Copyright (C) 2025, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
# Load required packages
using HiGHS
using Backend
const UCJL_HOST = get(ENV, "HOST", "0.0.0.0")
const UCJL_PORT = parse(Int, get(ENV, "PORT", "9000"))
println("Starting UnitCommitment Backend Server...")
println("Host: $UCJL_HOST")
println("Port: $UCJL_PORT")
println("Press Ctrl+C to stop the server")
server = Backend.start_server(UCJL_HOST, UCJL_PORT; optimizer = HiGHS.Optimizer)
try
wait()
catch e
if e isa InterruptException
println("\nShutting down server...")
Backend.stop(server)
println("Server stopped")
else
rethrow(e)
end
end