Interacts between SUMO and Urbanflo app.
- Clone the repository
- Run
./gradlew buildto build
docker compose up --force-recreate --builddocker compose up -d --force-recreateNote: ARM64/M1 users will need to use docker compose up -d --force-recreate --build for now, as the pre-built image is
only for x86-64. This is because the ARM version of SUMO package does not include libtracijni, requiring a build from
scratch, and the CI job keeps timing out for ARM.
See this issue to learn more
java -jar build/libs/urbanflo-sumo-server-0.0.1-SNAPSHOT.jarYou'll need libtracijni to be in the Java library path, or you'll get UnsatisfiedLinkError when starting the server. You can do this by either adding $LIBTRACI_LIB to PATH or passing -Djava.library.path=$LIBTRACI_LIB to the java command, where $LIBTRACI_LIB is the location of libtracijni binary, such as $SUMO_HOME/bin if you used the official installation method on Linux. Consult the SUMO docs for more information.
There are 2 configuration profiles, the default one and prod. The only difference is prod launches the server at port 80 while the default one uses port 8080.
You can select prod profile by passing -Dspring.profiles.active=prod to java command.
URBANFLO_FRONTEND_URL: sets the frontend URL for CORS endpoint. Defaults tohttp://localhost:5173and is ignored whenURBANFLO_ALLOW_ALL_CORS_ORIGINSistrueURBANFLO_ALLOW_ALL_CORS_ORIGINS: if set totrue, the server will accept all CORS origins. Defaults tofalse.
See the TraCI configuration section on how to add libtracijni to Java library path.
Alternatively you can skip testing by passing -x test to gradle.
You need to configure CORS for your setup. See environment variables for more information.
See ARCHITECTURE.md.
Licensed under MIT License.