docs(hosting): update git setup

This commit is contained in:
Dustin Stiles 2025-03-24 13:35:08 -04:00
parent 203d8a6393
commit b3f08e5e36
Signed by: duwstiles
GPG Key ID: BCD9912EC231FC87

View File

@ -2,44 +2,66 @@
## Installation ## Installation
We currently support two installation methods for DSFX: Docker and manual installation. Due to the maturity of the project, we haven't yet created a release strategy.
In order to install DSFX, we recommend building the project from source.
### Docker ### Dependencies
**pre-requisites**: In order to build the project from source, you will need to have git installed
on your system, as well as the go compiler. You can install these dependencies
- docker using your system's package manager. For example, on Ubuntu, you can run:
To run DSFX using Docker, you first need to log into the gitea registry. You can do this with the
following command.
```bash ```bash
export GITEA_PAT="hex string of pat created in gitea console" sudo apt-get install git golang
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. ### Git Setup
```bash Currently we are hosted on **gitea cloud**, which hides everything from the
docker run -d --name dsfx -p 8000:8000 koti.casa/numenorlabs/dsfx:latest public internet by default. This means that you will need to authenticate with
your gitea account as if you were cloning a private repository, even though our
repository is public. An easy way to do this is with the `.netrc` file combined
with a personal access token. You can create a `.netrc` file in your home directory
with the following contents:
```plaintext
machine koti.casa login <your username> password <gitea personal access token>
``` ```
### Manual Installation Finally, you'll need to set the `GOPRIVATE` environment variable to allow go to fetch
private repositories. You can do this by running the following command:
**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 ```bash
git clone https://koti.casa/numenor-labs/dsfx.git export GOPRIVATE=koti.casa
```
cd dsfx If you want to persist this setting across sessions, you can add the above line to your
`~/.bashrc` or `~/.bash_profile`.
go build -o <installation-target> ./cmd/dsfx ### Installation
Now that you have the go toolchain set up with access to our repository, you can simply install the
project by using the `go install` command.
```bash
go install koti.casa/numenorlabs/dsfx/cmd/dsfx@main
```
### Running
You can run the DSFX server using the `dsfx` command, which will be available in your `$GOPATH/bin`
directory after installation. If you have added `$GOPATH/bin` to your `PATH`, you can run the server
directly from the command line:
```bash
dsfx
```
Optionally, you can run the command directly via the `go run` command if you prefer not to install
the project globally. This can be done with the following command:
```bash
go run koti.casa/numenorlabs/dsfx/cmd/dsfx@main
``` ```
## Environment Variables ## Environment Variables
@ -59,15 +81,3 @@ DSFX uses the following environment variables to configure its behavior:
The DSFX server uses local files for configuration and storage. The default directories for these 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_DATA_DIR` environment variables. You can files are specified in the `DSFX_CONFIG_DIR` and `DSFX_DATA_DIR` environment variables. You can
change these directories by setting the corresponding environment variables before starting the server. 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
```