Skip to content

Commit

Permalink
Merge pull request #1 from UnownHash/docker
Browse files Browse the repository at this point in the history
Docker Workflow Support
  • Loading branch information
ccev authored Mar 27, 2024
2 parents a2036f4 + 7feb4f4 commit 1b33329
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: publish

on: [push]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
5 changes: 5 additions & 0 deletions config.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"host": "0.0.0.0",
"port": 5090,
"fingerprint_random_path": "/xilriws-fingerprint-random/"
}
4 changes: 2 additions & 2 deletions docker-compose.yml → docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
xilriws:
image: xilriws
image: ghcr.io/unownhash/xilriws-public:main
restart: unless-stopped
volumes:
- ./xilriws.json:/xilriws/config.json
Expand All @@ -19,4 +19,4 @@ services:
labels:
- traefik.http.routers.xilriws.rule=HostRegexp(`{catchall:.*}`)
deploy:
replicas: 1
replicas: 1
Binary file added xilriws
Binary file not shown.

0 comments on commit 1b33329

Please sign in to comment.