diff --git a/build/latest/Dockerfile b/build/latest/Dockerfile index f90ba20..c891a23 100644 --- a/build/latest/Dockerfile +++ b/build/latest/Dockerfile @@ -33,5 +33,21 @@ WORKDIR /opt/opensim/bin COPY docker-entrypoint.sh /usr/local/bin/ +ENV \ + OS_BASE_HOSTNAME="localhost" \ + OS_GRID_NAME="My OpenSimulator Grid" \ + OS_GRID_WELCOME="Welcome to my OpenSimulator grid!" \ + OS_REGION_NAME="My Region" \ + OS_ESTATE_NAME="My Estate" \ + OS_ESTATE_OWNER_NAME="Foo Bar" \ + OS_ESTATE_OWNER_UUID="00000000-0000-0000-0000-000000000001" \ + OS_DATABASE_ENGINE="sqlite" \ + OS_MYSQL_SERVER="localhost" \ + OS_MYSQL_DATABASE="opensim" \ + OS_MYSQL_USERNAME="opensim" \ + OS_PHYSICS_ENGINE="OpenDynamicsEngine" +# - OS_ESTATE_OWNER_PASSWORD +# - OS_MYSQL_PASSWORD + ENTRYPOINT ["docker-entrypoint.sh"] CMD [ "screen", "-S", "OpenSim", "-D", "-m", "dotnet", "OpenSim.dll" ] diff --git a/build/latest/defaults/OpenSim.ini b/build/latest/defaults/OpenSim.ini index 06e02e1..fb39d54 100644 --- a/build/latest/defaults/OpenSim.ini +++ b/build/latest/defaults/OpenSim.ini @@ -1,6 +1,21 @@ +[Environment] + OS_BASE_HOSTNAME = ignored + OS_GRID_NAME = ignored + OS_GRID_WELCOME = ignored + OS_REGION_NAME = ignored + OS_ESTATE_NAME = ignored + OS_ESTATE_OWNER_NAME = ignored + OS_ESTATE_OWNER_PASSWORD = ignored + OS_ESTATE_OWNER_UUID = ignored + OS_DATABASE_ENGINE = ignored + OS_MYSQL_SERVER = ignored + OS_MYSQL_DATABASE = ignored + OS_MYSQL_USERNAME = ignored + OS_MYSQL_PASSWORD = ignored + OS_PHYSICS_ENGINE = ignored [Const] - BaseHostname = "localhost" + BaseHostname = ${Environment|OS_BASE_HOSTNAME} BaseURL = http://${Const|BaseHostname} PublicPort = "9000" PrivURL = ${Const|BaseURL} @@ -37,3 +52,17 @@ [WebStats] enabled = true + +[Startup] + physics = ${Environment|OS_PHYSICS_ENGINE} + +[Estates] + DefaultEstateName = ${Environment|OS_ESTATE_NAME} + DefaultEstateOwnerName = ${Environment|OS_ESTATE_OWNER_NAME} + DefaultEstateOwnerUUID = ${Environment|OS_ESTATE_OWNER_UUID} + DefaultEstateOwnerEMail = ${Environment|OS_ESTATE_OWNER_EMAIL} + DefaultEstateOwnerPassword = ${Environment|OS_ESTATE_OWNER_PASSWORD} + +[Messaging] + ; StorageProvider = "OpenSim.Data.MySQL.dll" + ; ConectionString = "Data Source=${MYSQL_SERVER:-db};Database=${MYSQL_DATABASE:-opensim};User ID=${MYSQL_USER:-root};Password=${MYSQL_PASSWORD};Old Guids=true;" diff --git a/build/latest/defaults/StandaloneCommon.ini b/build/latest/defaults/StandaloneCommon.ini index b9e9fc5..f9dbc4b 100644 --- a/build/latest/defaults/StandaloneCommon.ini +++ b/build/latest/defaults/StandaloneCommon.ini @@ -15,7 +15,7 @@ LibraryName = "Library" [LoginService] - WelcomeMessage = "OpenSimulator is running!" + WelcomeMessage = ${Environment|MESSAGE} SRV_HomeURI = "${Hypergrid|HomeURI}" SRV_InventoryServerURI = "${Const|BaseURL}:${Const|PublicPort}" SRV_AssetServerURI = "${Const|BaseURL}:${Const|PublicPort}" diff --git a/build/latest/docker-entrypoint.sh b/build/latest/docker-entrypoint.sh index 3b213f7..d7b63ec 100755 --- a/build/latest/docker-entrypoint.sh +++ b/build/latest/docker-entrypoint.sh @@ -7,23 +7,23 @@ if [ ! -e OpenSim.ini ]; then echo >&2 "INFO: No OpenSim configuration found, pulling one together." cp defaults/OpenSim.ini OpenSim.ini - if [ -n "${PHYSICS_ENGINE}" ]; then - echo -e "\n[Startup] - physics = ${PHYSICS_ENGINE:-BulletSim}" >> OpenSim.ini - fi + # if [ -n "${PHYSICS_ENGINE}" ]; then + # echo -e "\n[Startup] + # physics = ${PHYSICS_ENGINE:-BulletSim}" >> OpenSim.ini + # fi - echo -e "\n[Estates] - DefaultEstateName = ${ESTATE_NAME:-Default Estate} - DefaultEstateOwnerName = ${ESTATE_OWNER_NAME:-Foo Bar} - DefaultEstateOwnerUUID = ${ESTATE_OWNER_UUID:-00000000-0000-0000-0000-000000000000} - DefaultEstateOwnerEMail = ${ESTATE_OWNER_EMAIL:-user@example.com} - DefaultEstateOwnerPassword = ${ESTATE_OWNER_PASSWORD:-password}" >> OpenSim.ini + # echo -e "\n[Estates] + # DefaultEstateName = ${ESTATE_NAME:-Default Estate} + # DefaultEstateOwnerName = ${ESTATE_OWNER_NAME:-Foo Bar} + # DefaultEstateOwnerUUID = ${ESTATE_OWNER_UUID:-00000000-0000-0000-0000-000000000000} + # DefaultEstateOwnerEMail = ${ESTATE_OWNER_EMAIL:-user@example.com} + # DefaultEstateOwnerPassword = ${ESTATE_OWNER_PASSWORD:-password}" >> OpenSim.ini - if [[ "${DATABASE_ENGINE}" == "mysql" ]]; then - echo -e "\n[Messaging] - StorageProvider = \"OpenSim.Data.MySQL.dll\" - ConectionString = \"Data Source=${MYSQL_SERVER:-db};Database=${MYSQL_DATABASE:-opensim};User ID=${MYSQL_USER:-root};Password=${MYSQL_PASSWORD};Old Guids=true;\"" >> OpenSim.ini - fi + # if [[ "${DATABASE_ENGINE}" == "mysql" ]]; then + # echo -e "\n[Messaging] + # StorageProvider = \"OpenSim.Data.MySQL.dll\" + # ConectionString = \"Data Source=${MYSQL_SERVER:-db};Database=${MYSQL_DATABASE:-opensim};User ID=${MYSQL_USER:-root};Password=${MYSQL_PASSWORD};Old Guids=true;\"" >> OpenSim.ini + # fi else echo >&2 "INFO: OpenSimulator general configuration found. Skipping..." fi @@ -32,26 +32,26 @@ if [ ! -e config-include/StandaloneCommon.ini ] && [ ! -e config-include/GridCom echo >&2 "INFO: No Grid Common configuration found, pulling one together." cp defaults/StandaloneCommon.ini config-include/StandaloneCommon.ini - echo "[DatabaseService]" >> config-include/StandaloneCommon.ini - if [[ "${DATABASE_ENGINE}" == "mysql" ]]; then - echo " StorageProvider = \"OpenSim.Data.MySQL.dll\"" >> config-include/StandaloneCommon.ini - echo " ConnectionString = \"Data Source=${MYSQL_SERVER:-db};Database=${MYSQL_DATABASE:-opensim};User ID=${MYSQL_USER:-root};Password=${MYSQL_PASSWORD};Old Guids=true;\"" >> config-include/StandaloneCommon.ini - else - echo " Include-Storage = \"config-include/storage/SQLiteStandalone.ini\"" >> config-include/StandaloneCommon.ini - fi + # echo "[DatabaseService]" >> config-include/StandaloneCommon.ini + # if [[ "${DATABASE_ENGINE}" == "mysql" ]]; then + # echo " StorageProvider = \"OpenSim.Data.MySQL.dll\"" >> config-include/StandaloneCommon.ini + # echo " ConnectionString = \"Data Source=${MYSQL_SERVER:-db};Database=${MYSQL_DATABASE:-opensim};User ID=${MYSQL_USER:-root};Password=${MYSQL_PASSWORD};Old Guids=true;\"" >> config-include/StandaloneCommon.ini + # else + # echo " Include-Storage = \"config-include/storage/SQLiteStandalone.ini\"" >> config-include/StandaloneCommon.ini + # fi - echo "[GridService] - StorageProvider = \"OpenSim.Data.Null.dll:NullRegionData\" - Region_${REGION_NAME:-Region} = \"DefaultRegion, FallbackRegion\" - ExportSupported = true" >> config-include/StandaloneCommon.ini + # echo "[GridService] + # StorageProvider = \"OpenSim.Data.Null.dll:NullRegionData\" + # Region_${REGION_NAME:-Region} = \"DefaultRegion, FallbackRegion\" + # ExportSupported = true" >> config-include/StandaloneCommon.ini - if [ -n "${GRID_WELCOME}" ]; then - sed -i -e "s/OpenSimulator is running!/${GRID_WELCOME}/g" config-include/StandaloneCommon.ini - fi + # if [ -n "${GRID_WELCOME}" ]; then + # sed -i -e "s/OpenSimulator is running!/${GRID_WELCOME}/g" config-include/StandaloneCommon.ini + # fi - if [ -n "${GRID_NAME}" ]; then - sed -i -e "s/OpenSimulator Instance/${GRID_NAME}/g" config-include/StandaloneCommon.ini - fi + # if [ -n "${GRID_NAME}" ]; then + # sed -i -e "s/OpenSimulator Instance/${GRID_NAME}/g" config-include/StandaloneCommon.ini + # fi else echo >&2 "INFO: Standalone or Grid configuration found. Skipping..." fi @@ -59,13 +59,13 @@ fi if [ `find Regions -maxdepth 1 -name '*.ini' | wc -l` -eq 0 ]; then echo >&2 "INFO: No region details found, pulling one together." - echo "[${REGION_NAME:-Region}] - RegionUUID = $(uuidgen) - Location = ${REGION_LOCATION:-1000,1000} - InternalAddress = 0.0.0.0 - InternalPort = 9000 - AllowAlternatePorts = False - ExternalHostName = ${REGION_EXTERNAL_HOSTNAME:-localhost}" >> Regions/Regions.ini + # echo "[${REGION_NAME:-Region}] + # RegionUUID = $(uuidgen) + # Location = ${REGION_LOCATION:-1000,1000} + # InternalAddress = 0.0.0.0 + # InternalPort = 9000 + # AllowAlternatePorts = False + # ExternalHostName = ${REGION_EXTERNAL_HOSTNAME:-localhost}" >> Regions/Regions.ini else echo >&2 "INFO: Looks like there's region definitions. Skipping..." fi