Skip to content

Commit

Permalink
Remove env and compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chrzrdx committed Sep 23, 2024
1 parent 904fb22 commit 97ed8fd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 48 deletions.
9 changes: 0 additions & 9 deletions .env.example

This file was deleted.

52 changes: 24 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,30 @@ For a release build, use:
cargo build --release
```

## Database setup and Configuration

1. If you don't already have a MySQL database set up, you can use our Docker Compose configuration to spin up a local instance. To do this, run:
```sh
docker compose up
```
This will start a local MySQL database with the configuration specified in the `.env` file.

2. Create a `.env` file at the root of the repository using `.env.example` as a template. Replace `CHANGEME` with your own secure passwords, leaving other configuration options as is:

```ini
# database settings
MYSQL_ROOT_PASSWORD="CHANGEME"
MYSQL_PASSWORD="CHANGEME"
MYSQL_USER="reoserv"
MYSQL_DATABASE="reoserv"
TZ="UTC"

# misc
RUST_DEBUG="info" # or "trace" for more detailed output
```

3. Edit the server configuration in `config/Config.toml` or a copy of it (`config/Config.local.toml`). Edit the database connection settings to match the `MYSQL_PASSWORD` in the `.env` file.
> [!NOTE]
> Set up and configure a MySQL database before starting the server. See the section below for instructions.
> Edit `config/Config.toml` to match your production database before creating a release build.
## Database setup and configuration

We use a MySQL database to store game data.

1. If you don't have a MySQL database set up, you can run this Docker command to create one:
```sh
docker run --name reoserv-db \
-e MYSQL_ROOT_PASSWORD="CHANGEME" \
-e MYSQL_PASSWORD="CHANGEME" \
-e MYSQL_USER="reoserv" \
-e MYSQL_DATABASE="reoserv" \
-e TZ="UTC" \
-p "3306:3306" \
-v ./db-init/:/docker-entrypoint-initdb.d/ \
--restart unless-stopped \
-d mariadb:latest
```
Replace `CHANGEME` with your own secure passwords.

2. Edit the database connection settings in `config/Config.toml` or `config/Config.local.toml` accordingly before building / running the server.

## Start the server

Expand All @@ -59,11 +60,6 @@ To run the server, use:
cargo run
```

The logging level can be adjusted by changing the `RUST_LOG` variable in the `.env` file. The options are:

- `debug`: This will print human-readable data structures for every packet.
- `trace`: This will print the raw byte arrays for every packet.

## Setup quests, NPCs and items for your server

See [our documentation](https://reoserv.net/docs) for instructions on how to setup quests, NPCs, items and more for your server.
Expand Down
11 changes: 0 additions & 11 deletions compose.yml

This file was deleted.

0 comments on commit 97ed8fd

Please sign in to comment.