Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: CI
on:
push:
branches: [main, master]
tags: ["v*"]
pull_request:
Comment thread
coderabbitai[bot] marked this conversation as resolved.

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -32,3 +36,37 @@ jobs:
sleep 1
done
scripts/curl-smoke.sh http://localhost:8080

publish:
runs-on: ubuntu-latest
needs: [test, docker]
if: github.event_name != 'pull_request'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
flavor: |
latest=false
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ The full wire contract is in [docs/API.md](docs/API.md).
```sh
docker run -d --name crosspoint-sync \
-p 8080:8080 \
-v "$PWD/data:/data" \
ghcr.io/OWNER/crosspoint-sync:latest
-v crosspoint-data:/data \
ghcr.io/crosspoint-reader/crosspoint-sync:main
```

Or from a checkout: `docker compose up -d` (see `docker-compose.yml`).
Or from a checkout: `docker compose up -d` uses the published image from
`docker-compose.yml`.

For local image builds from the checkout, use:

```sh
docker compose -f docker-compose.dev.yml up -d --build
```

### Railway (hosted-style deploy)

Expand Down
14 changes: 14 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
crosspoint-sync:
build: .
ports:
- "8080:8080"
volumes:
- crosspoint-data:/data
environment:
# Set to "true" on private instances once your accounts exist.
REGISTRATION_DISABLED: "false"
restart: unless-stopped

volumes:
crosspoint-data:
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
services:
crosspoint-sync:
build: .
# or, once published: image: ghcr.io/<org>/crosspoint-sync:latest
image: ghcr.io/crosspoint-reader/crosspoint-sync:main
ports:
- "8080:8080"
volumes:
- ./data:/data
- crosspoint-data:/data
environment:
# Set to "true" on private instances once your accounts exist.
REGISTRATION_DISABLED: "false"
restart: unless-stopped

volumes:
crosspoint-data: