dsfx/docs/hosting.md

74 lines
2.3 KiB
Markdown
Raw Normal View History

2025-03-21 22:02:51 -04:00
# Hosting
2025-03-22 11:07:13 -04:00
## Installation
We currently support two installation methods for DSFX: Docker and manual installation.
### Docker
2025-03-22 11:26:56 -04:00
**pre-requisites**:
- docker
2025-03-22 11:07:13 -04:00
To run DSFX using Docker, you first need to log into the gitea registry. You can do this with the
following command.
```bash
export GITEA_PAT="hex string of pat created in gitea console"
echo $GITEA_PAT | docker login koti.casa -u <your-username> --password-stdin
```
Then, you can pull the DSFX image from the registry and run it.
```bash
2025-03-22 11:26:56 -04:00
docker run -d --name dsfx -p 8000:8000 koti.casa/numenorlabs/dsfx:latest
```
### Manual Installation
**pre-requisites**:
- go
To install DSFX manually, you need to clone the repository and compile the code. You can do this with
the following commands:
```bash
git clone https://koti.casa/numenor-labs/dsfx.git
cd dsfx
2025-03-22 12:26:17 -04:00
go build -o <installation-target> ./cmd/dsfx
2025-03-22 11:07:13 -04:00
```
2025-03-22 11:26:56 -04:00
## Environment Variables
DSFX uses the following environment variables to configure its behavior:
2025-03-22 12:26:17 -04:00
| Variable | Description | Default Value |
| ---------------- | ----------------------------------------------------------- | ---------------- |
| DSFX_HOST | The host on which the DSFX server will run | 0.0.0.0 |
| DSFX_PORT | The port on which the DSFX server will listen | 8000 |
| DSFX_LOG_LEVEL | The log level to use. One of (error, warn, info, debug) | info |
2025-03-22 12:26:17 -04:00
| DSFX_CONFIG_DIR | The directory where the DSFX configuration files are stored | /etc/dsfx/config |
2025-03-23 10:04:57 -04:00
| DSFX_STORAGE_DIR | The directory where the DSFX storage files are stored | /etc/dsfx/data |
## Local Files
The DSFX server uses local files for configuration and storage. The default directories for these
files are specified in the `DSFX_CONFIG_DIR` and `DSFX_STORAGE_DIR` environment variables. You can
change these directories by setting the corresponding environment variables before starting the server.
For docker installations, it is recommended to mount the local directories to the container
using the `-v` flag. For example:
```bash
docker run -d \
--name dsfx \
-p 8000:8000 \
-v /path/to/local/config:/etc/dsfx/config \
-v /path/to/local/data:/etx/dsfx/data \
koti.casa/numenorlabs/dsfx:latest
```