mirror of
https://github.com/soup-bowl/opensimulator-docker.git
synced 2026-07-30 03:23:41 +00:00
Added source build
This commit is contained in:
@@ -2,6 +2,10 @@ version: '3.6'
|
||||
services:
|
||||
db:
|
||||
image: docker.io/library/mariadb:10.5
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
timeout: 20s
|
||||
retries: 5
|
||||
volumes:
|
||||
- "database_store:/var/lib/mysql"
|
||||
environment:
|
||||
@@ -11,7 +15,8 @@ services:
|
||||
build:
|
||||
context: .
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9000:9000/udp"
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
|
||||
|
||||
RUN git clone git://opensimulator.org/git/opensim /app
|
||||
WORKDIR /app
|
||||
RUN git checkout dotnet6
|
||||
|
||||
RUN ./runprebuild.sh && ./compile.sh
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/runtime:6.0
|
||||
|
||||
LABEL org.opencontainers.image.title="OpenSimulator (unofficial)"
|
||||
LABEL org.opencontainers.image.authors="code@soupbowl.io"
|
||||
LABEL org.opencontainers.image.source="https://github.com/soup-bowl/opensimulator-docker"
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
|
||||
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev screen uuid-runtime
|
||||
|
||||
COPY --from=build /app /opt/opensim
|
||||
|
||||
COPY defaults /opt/opensim/bin/defaults
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
WORKDIR /opt/opensim/bin
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD [ "screen", "-S", "OpenSim", "-D", "-m", "sh", "./opensim.sh" ]
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
[Const]
|
||||
BaseHostname = "localhost"
|
||||
BaseURL = http://${Const|BaseHostname}
|
||||
PublicPort = "9000"
|
||||
PrivURL = ${Const|BaseURL}
|
||||
PrivatePort = "8003"
|
||||
|
||||
[Permissions]
|
||||
automatic_gods = false
|
||||
implicit_gods = false
|
||||
allow_grid_gods = true
|
||||
|
||||
[Network]
|
||||
http_listener_port = 9000
|
||||
ExternalHostNameForLSL = ${Const|BaseHostname}
|
||||
shard = "OpenSim"
|
||||
|
||||
[ClientStack.LindenCaps]
|
||||
Cap_GetTexture = "localhost"
|
||||
Cap_GetMesh = "localhost"
|
||||
Cap_AvatarPickerSearch = "localhost"
|
||||
Cap_GetDisplayNames = "localhost"
|
||||
|
||||
[BulletSim]
|
||||
AvatarToAvatarCollisionsByDefault = true
|
||||
|
||||
[XEngine]
|
||||
AppDomainLoading = false
|
||||
DeleteScriptsOnStartup = false
|
||||
|
||||
[OSSL]
|
||||
Include-osslDefaultEnable = "config-include/osslDefaultEnable.ini"
|
||||
|
||||
[Architecture]
|
||||
Include-Architecture = "config-include/Standalone.ini"
|
||||
|
||||
[WebStats]
|
||||
enabled = true
|
||||
@@ -0,0 +1,39 @@
|
||||
; These are the initialization settings for running OpenSim Standalone with an SQLite database
|
||||
|
||||
[DatabaseService]
|
||||
StorageProvider = "OpenSim.Data.SQLite.dll"
|
||||
ConnectionString = "URI=file:sqlite-database/OpenSim.db,version=3,UseUTF16Encoding=True"
|
||||
|
||||
[AssetService]
|
||||
ConnectionString = "URI=file:sqlite-database/Asset.db,version=3"
|
||||
|
||||
; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration.
|
||||
; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead.
|
||||
; However, the internal asset service will still use the [AssetService] section.
|
||||
; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService]
|
||||
; so that they both access the same database.
|
||||
; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and
|
||||
; do not have separate connection strings for different services.
|
||||
[HGAssetService]
|
||||
ConnectionString = "URI=file:sqlite-database/Asset.db,version=3"
|
||||
|
||||
[InventoryService]
|
||||
;ConnectionString = "URI=file:inventory.db,version=3"
|
||||
; if you have a legacy inventory store use the connection string below
|
||||
ConnectionString = "URI=file:sqlite-database/inventory.db,version=3,UseUTF16Encoding=True"
|
||||
|
||||
[AvatarService]
|
||||
ConnectionString = "URI=file:sqlite-database/avatars.db,version=3"
|
||||
|
||||
[AuthenticationService]
|
||||
ConnectionString = "URI=file:sqlite-database/auth.db,version=3"
|
||||
|
||||
[UserAccountService]
|
||||
ConnectionString = "URI=file:sqlite-database/userprofiles.db,version=3"
|
||||
|
||||
[GridUserService]
|
||||
ConnectionString = "URI=file:sqlite-database/griduser.db,version=3"
|
||||
|
||||
[FriendsService]
|
||||
ConnectionString = "URI=file:sqlite-database/friends.db,version=3"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
; This is the main configuration file for an instance of OpenSim running in standalone mode
|
||||
|
||||
[Hypergrid]
|
||||
HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||
|
||||
[Modules]
|
||||
AssetCaching = "FlotsamAssetCache"
|
||||
Include-FlotsamCache = "config-include/FlotsamCache.ini"
|
||||
|
||||
[AssetService]
|
||||
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
|
||||
AssetLoaderArgs = "assets/AssetSets.xml"
|
||||
|
||||
[LibraryModule]
|
||||
LibraryName = "Library"
|
||||
|
||||
[LoginService]
|
||||
WelcomeMessage = "OpenSimulator is running!"
|
||||
SRV_HomeURI = "${Hypergrid|HomeURI}"
|
||||
SRV_InventoryServerURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||
SRV_AssetServerURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||
SRV_ProfileServerURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||
SRV_FriendsServerURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||
SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}"
|
||||
MapTileURL = "${Const|BaseURL}:${Const|PublicPort}/"
|
||||
|
||||
[GridInfoService]
|
||||
login = ${Const|BaseURL}:${Const|PublicPort}/
|
||||
gridname = "OpenSimulator Instance"
|
||||
gridnick = "osss"
|
||||
welcome = ${Const|BaseURL}:8080
|
||||
|
||||
[GatekeeperService]
|
||||
AllowTeleportsToAnyRegion = true
|
||||
|
||||
[EntityTransfer]
|
||||
AccountForAppearance = "Test User, Astronaut Smith"
|
||||
|
||||
[UserProfilesService]
|
||||
Enabled = false
|
||||
LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService"
|
||||
UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService
|
||||
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
|
||||
@@ -0,0 +1,36 @@
|
||||
version: '3.6'
|
||||
services:
|
||||
db:
|
||||
image: docker.io/library/mariadb:10.5
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
timeout: 20s
|
||||
retries: 5
|
||||
volumes:
|
||||
- "database_store:/var/lib/mysql"
|
||||
environment:
|
||||
MYSQL_DATABASE: metaverse
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
metaverse:
|
||||
container_name: opensim
|
||||
build:
|
||||
context: .
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9000:9000/udp"
|
||||
environment:
|
||||
DATABASE_ENGINE: mysql
|
||||
MYSQL_SERVER: db
|
||||
MYSQL_DATABASE: metaverse
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: password
|
||||
ESTATE_OWNER_NAME: Governor Linden
|
||||
ESTATE_OWNER_PASSWORD: password
|
||||
|
||||
volumes:
|
||||
database_store:
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeo pipefail
|
||||
|
||||
chown -R $(id -u):$(id -g) defaults
|
||||
|
||||
if [ ! -e OpenSim.ini ]; then
|
||||
echo >&2 "INFO: No OpenSim configuration found, pulling one together."
|
||||
cp defaults/OpenSim.ini 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
|
||||
else
|
||||
echo >&2 "INFO: OpenSimulator general configuration found. Skipping..."
|
||||
fi
|
||||
|
||||
if [ ! -e config-include/StandaloneCommon.ini ] || [ ! -e config-include/GridCommon.ini ]; then
|
||||
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 "[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_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
|
||||
|
||||
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
|
||||
else
|
||||
echo >&2 "INFO: Looks like there's region definitions. Skipping..."
|
||||
fi
|
||||
|
||||
if [ ! -e config-include/storage/SQLiteStandalone.ini ]; then
|
||||
cp defaults/SQLiteStandalone.ini config-include/storage/SQLiteStandalone.ini
|
||||
mkdir -p sqlite-database
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user