build(docker): add docker setup

This commit is contained in:
Dustin Stiles 2025-03-22 11:07:13 -04:00
parent b1557e2d7b
commit e3bdade88b
Signed by: duwstiles
GPG Key ID: BCD9912EC231FC87
3 changed files with 40 additions and 1 deletions

View File

@ -21,3 +21,8 @@ jobs:
run: | run: |
git tag "${{ gitea.event.inputs.version }}" git tag "${{ gitea.event.inputs.version }}"
git push origin "${{ gitea.event.inputs.version }}" git push origin "${{ gitea.event.inputs.version }}"
- name: Push Docker Image
run: |
echo "${{ secrets.PAT }}" | docker login -u ${{ gitea.actor }} --password-stdin koti.casa/numenor-labs
docker build -t koti.casa/numenor-labs/dsfx:${{ gitea.event.inputs.version }} .
docker push koti.casa/numenor-labs/dsfx:${{ gitea.event.inputs.version }}

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM golang:1.24 AS builder
WORKDIR /app
COPY . .
RUN GOOS=linux CGO_ENABLED=0 go build -o /app/dsfx ./cmd/dsfxnode
FROM scratch
COPY --from=builder /app/dsfx /app/dsfx
EXPOSE 8000
ENTRYPOINT ["/app/dsfx"]

View File

@ -1,3 +1,22 @@
# Hosting # Hosting
Work in progress. ## Installation
We currently support two installation methods for DSFX: Docker and manual installation.
### Docker
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
docker run -d --name dsfx -p 8080:8080numenorlabs/dsfx
```