# NEW MC Server - Powered by Garde Studios

## Development

### (Prerequisite) Install Docker

Go to the Website [docker.com](https://www.docker.com/) and download the Docker Desktop Version for you're Operating System.

In case you're using Linux find a guide on the internet. For RHEL/Fedora/CentOS/Rocky Linux the setup process is as follows:

```bash
sudo dnf check-update # Update System
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # Add the docker repo to dnf
sudo dnf install docker-ce docker-ce-cli containerd.io -y # Install docker engine
sudo systemctl start docker # start docker deamon
sudo systemctl enable docker # enable docker deamon on startup
sudo usermod -aG docker $(whoami) # elevate user to use docker cmd 
```

### Starting the Server 

> [!WARNING]
> Make sure you first configure the `docker-compose.yml` under the `environment` section to use the appropiate ammount of RAM youre system can provide.
> 16GB isn't sensible in most development/testing environments

Start a Terminal or use Docker Desktop

> [!NOTE]
> The first Startup creates the whole infrastructure behind the project and can take up some time.
> Make sure you grab some 0xCOFFE :)

#### Using Docker CLI

cd into the repo.

Start the Server:

```bash
docker compose up 
```

To close it just use `ctrl+c`.
 
Deamon Mode:

```bash
docker compose up -d
```

To hook into the servers logs use:

```bash
docker logs <container-name>
```

Killing the server is done in two ways.

Either by killing it directly:

```bash
docker kill <container-name>
```

Or by hooking against the compose file:

```bash
docker compose down 
```

## Architecture

![](assets/Architecture-Overview.png)
