Skip to content

Commit

Permalink
add data folder by default, make world ports configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mick Vermeulen authored and Mick Vermeulen committed Sep 12, 2020
1 parent 16519e5 commit 373bf9d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
data
data/*
!data/.gitkeep
.env
.DS_Store
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@ Copy the `.env.sample` file to `.env`:
cp .env.sample .env
```

Set the `GAME_FOLDER` variable in the `.env` file to path to the `/res` folder in your unpacked `LU` game folder.

Next, create the `data` folder that's used to store the Postgres and Redis database files to ensure no loss of data:

```bash
mkdir data
```

Deleting this folder will result in your Postgres database being wiped, including all the progress you've made in-game, be cautious when handling this folder!
Set the `GAME_FOLDER` variable in the `.env` file to the absolute path to the `/res` folder in your unpacked `LU` game folder.

## Running

Expand All @@ -58,4 +50,8 @@ docker-compose down

## Adminer

Uchu Docker also automatically runs [Adminer](https://www.adminer.org), which allows you to easily modify the Uchu database in a user friendly way. After running Uchu Docker you can access Adminer through your browser at [this link](0.0.0.0:8080). Select the `PostgreSQL` database type, set the server to `db` and enter the credentials found in the `.env` file to login. More info on how to use Adminer can be found on their website.
Uchu Docker also automatically runs [Adminer](https://www.adminer.org), which allows you to easily modify the Uchu database in a user friendly way. After running Uchu Docker you can access Adminer through your browser at [this link](0.0.0.0:8080). Select the `PostgreSQL` database type, set the server to `db` and enter the credentials found in the `.env` file to login. More info on how to use Adminer can be found on their website.

## World ports (Advanced)

If you wish to change the world ports, you can change the exposed ports in the `.env` file easily. The internal ports are locked by default to `2002` for the charater port and `10000-10100` for the api and world ports. If you wish to change these internal ports update the internal port values in the `.env` file. Ensure that `INTERNAL_API_PORT_RANGE` is updated to match your updated `INTERNAL_API_PORT` and `INTERNAL_MAX_WORLDS`.
6 changes: 3 additions & 3 deletions config.default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
<Networking>
<Certificate />
<Hostname />
<CharacterPort>$CHARACTER_PORT</CharacterPort>
<CharacterPort>$INTERNAL_CHARACTER_PORT</CharacterPort>
<HostAuthentication>true</HostAuthentication>
<HostCharacter>true</HostCharacter>
<MaxWorldServers>$MAX_WORLD_SERVERS</MaxWorldServers>
<MaxWorldServers>$INTERNAL_MAX_WORLDS</MaxWorldServers>
</Networking>
<GamePlay>
<PathFinding>false</PathFinding>
Expand All @@ -40,7 +40,7 @@
<Api>
<Protocol>http</Protocol>
<Domain>localhost</Domain>
<Port>$API_PORT</Port>
<Port>$INTERNAL_API_PORT</Port>
</Api>
<Sso>
<Domain />
Expand Down
Empty file added data/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
volumes:
- ${GAME_FOLDER}:/res
ports:
- "2002:${CHARACTER_PORT}"
- "10000-10100:${API_PORT}-${MAX_API_PORT}"
- "${CHARACTER_PORT}:${INTERNAL_CHARACTER_PORT}"
- "${API_PORT_RANGE}:${INTERNAL_API_PORT_RANGE}"
tty: true
stdin_open: true

0 comments on commit 373bf9d

Please sign in to comment.