Files
stellar/UNRAID.md

133 lines
2.5 KiB
Markdown
Raw Normal View History

2026-03-22 23:59:52 -05:00
# Unraid Deployment
This project currently ships as a single container:
- the React client is built into `client/dist`
- the Express server serves both static assets and API routes
- the container listens on port `3000`
## Prerequisites
- Unraid server with Docker enabled
- Git access to the repository
- Internet access for `npm ci` during image build
## Option 1: Build On Unraid From Source
Clone the repo somewhere persistent on the Unraid host:
```bash
cd /mnt/user/appdata
git clone https://git.alwisp.com/jason/stellar.git
cd stellar
```
Build the image from the repo root:
```bash
2026-03-23 00:06:01 -05:00
docker build -t stellar:local .
2026-03-22 23:59:52 -05:00
```
Start the container:
```bash
docker run -d \
--name stellar \
--restart unless-stopped \
-p 8080:3000 \
-e PORT=3000 \
-e LOG_LEVEL=info \
2026-03-23 00:16:50 -05:00
-e DATABASE_PATH=/data/stellar.sqlite \
-v /mnt/user/appdata/stellar:/data \
2026-03-22 23:59:52 -05:00
stellar:local
```
Open the game at:
```text
http://<your-unraid-ip>:8080
```
## Option 2: Build With Compose On Unraid
From the repo root:
```bash
2026-03-23 00:06:01 -05:00
docker compose build
docker compose up -d
2026-03-22 23:59:52 -05:00
```
2026-03-23 00:06:01 -05:00
This uses the repo's single-service compose file and exposes the app on port `8080`.
2026-03-22 23:59:52 -05:00
## Option 3: Pull A Prebuilt Image
If you publish an image to your registry, run:
```bash
docker pull <your-registry>/stellar:<tag>
docker run -d \
--name stellar \
--restart unless-stopped \
-p 8080:3000 \
-e PORT=3000 \
-e LOG_LEVEL=info \
2026-03-23 00:16:50 -05:00
-e DATABASE_PATH=/data/stellar.sqlite \
-v /mnt/user/appdata/stellar:/data \
2026-03-22 23:59:52 -05:00
<your-registry>/stellar:<tag>
```
## Health Check
The server exposes:
```text
/healthz
```
Example:
```bash
curl http://<your-unraid-ip>:8080/healthz
```
Expected response:
```json
{"status":"ok"}
```
## Updating
If building from source:
```bash
cd /mnt/user/appdata/stellar
git pull
2026-03-23 00:06:01 -05:00
docker build -t stellar:local .
2026-03-22 23:59:52 -05:00
docker rm -f stellar
docker run -d \
--name stellar \
--restart unless-stopped \
-p 8080:3000 \
-e PORT=3000 \
-e LOG_LEVEL=info \
2026-03-23 00:16:50 -05:00
-e DATABASE_PATH=/data/stellar.sqlite \
-v /mnt/user/appdata/stellar:/data \
2026-03-22 23:59:52 -05:00
stellar:local
```
If using compose:
```bash
cd /mnt/user/appdata/stellar
git pull
2026-03-23 00:06:01 -05:00
docker compose up -d --build
2026-03-22 23:59:52 -05:00
```
## Notes
2026-03-23 00:16:50 -05:00
- SQLite persistence now defaults to `/data/stellar.sqlite` in containers.
- The examples above bind `/mnt/user/appdata/stellar` into `/data` so profile data survives container recreation.
2026-03-22 23:59:52 -05:00
- If Unraid already uses port `8080`, change the host-side port mapping and browse to that port instead.
- Logs are written to container stdout/stderr and can be viewed from the Unraid Docker UI or with `docker logs stellar`.