mirror of
https://github.com/soup-bowl/opensimulator-docker.git
synced 2026-07-28 06:35:01 +00:00
Changes for sqlite persistence.
This commit is contained in:
@@ -41,6 +41,18 @@ Once the server is running, you should be able to connect to it on `localhost:90
|
||||
|
||||
If you don't define otherwise in the environments or a custom configuration, the login username is **Foo bar** and the password is **password**.
|
||||
|
||||
### SQLite Persistence
|
||||
|
||||
Outside of configurations, pretty much everything OpenSimulator does is stored in your chosen database provider. If you choose to leave the default on (sqlite), then your installation will not persist if you remove your container.
|
||||
|
||||
To aid the use of SQLite mode with persistent data, the default configuration has been modified to create the database directories into a dedicated directory (`/opt/opensim/bin/sqlite-database`). The following command will allow you to run a persistent SQLite setup.
|
||||
|
||||
(Note that if you use a custom `SQLiteStandalone.ini` file, this will not happen).
|
||||
|
||||
```
|
||||
docker run -d --name opensim -p 9000:9000 -p 9000:9000/udp -v /path/on/your/system:/opt/opensim/bin/sqlite-database soupbowl/opensimulator:latest
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
At current, there doesn't appear to be an implemented and/or documented approach to managing the server from _outside_ the active TTY, and running `docker attach opensim` seems to produce a blank prompt. You can `exec` into the container or edit the bound configuration script and restart the server to make changes, but in some server instances you might need to intercept the prompt.
|
||||
|
||||
@@ -13,6 +13,7 @@ RUN mkdir /opt/opensim-tmp \
|
||||
&& curl "http://opensimulator.org/dist/opensim-${OPENSIM_VERSION}.tar.gz" | tar xzf - -C /opt/opensim-tmp \
|
||||
&& rm /opt/opensim-tmp/opensim*/bin/OpenSim.ini \
|
||||
&& rm /opt/opensim-tmp/opensim*/bin/config-include/StandaloneCommon.ini \
|
||||
&& rm /opt/opensim-tmp/opensim*/bin/config-include/storage/SQLiteStandalone.ini \
|
||||
&& mkdir /opt/opensim \
|
||||
&& mv /opt/opensim-tmp/opensim*/* /opt/opensim
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -59,4 +59,9 @@ if [ `find Regions -maxdepth 1 -name '*.ini' | wc -l` -eq 0 ]; then
|
||||
ExternalHostName = localhost" >> Regions/Regions.ini
|
||||
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