diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 874694f..f821375 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,7 +7,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository_owner }}/sup-server + IMAGE_NAME: ${{ github.repository_owner }}/sup jobs: build: diff --git a/.gitignore b/.gitignore index ee5f2e3..9ba758d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules/ signal-cli .env -sup-server +sup diff --git a/README.md b/README.md index 2294128..4191662 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ For API-based monitoring, call `/api/health` which returns JSON: SUP consists of two services that **MUST run together on the same machine**: -- **sup-server** (Bun): Receives webhooks, sends Signal messages via signal-cli. Optional: monitors Proton Mail IMAP +- **sup** (Bun): Receives webhooks, sends Signal messages via signal-cli. Optional: monitors Proton Mail IMAP - **protonmail-bridge** (Official Proton, optional): Decrypts Proton Mail emails, runs local IMAP server All services communicate over a private Docker network with no external exposure except Signal protocol. **Separating these services across multiple machines would expose plaintext IMAP traffic and compromise security.** diff --git a/docker-compose.yml b/docker-compose.yml index 07815c3..3c8abe6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: server: - image: ghcr.io/lone-cloud/sup-server:latest + image: ghcr.io/lone-cloud/sup:latest ports: - '8080:8080' environment: diff --git a/package.json b/package.json index 29dae63..18e8283 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sup", - "version": "0.1.2", + "version": "0.1.3", "description": "Privacy-preserving push notifications using Signal as transport", "private": true, "type": "module", @@ -16,7 +16,7 @@ "scripts": { "postinstall": "bun run scripts/install-signal-cli.ts || true", "start": "bun run server/index.ts", - "build": "bun build --compile server/index.ts --outfile server/sup-server", + "build": "bun build --compile server/index.ts --outfile server/sup", "check": "tsc --noEmit && biome check .", "fix": "biome check --write --unsafe .", "release": "bun run scripts/release.ts" diff --git a/scripts/release.ts b/scripts/release.ts index f629e31..b93e339 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -21,19 +21,36 @@ try { console.log(`Pushing tag to trigger CI build...`); await $`git push origin ${version}`; + console.log(`\nCreating GitHub release...`); + await $`gh release create ${version} --title ${version} --notes "## Docker Images + +Pull the latest version: +\`\`\`bash +docker pull ghcr.io/lone-cloud/sup:${version} +\`\`\` + +Or use in your \`docker-compose.yml\`: +\`\`\`yaml +services: + server: + image: ghcr.io/lone-cloud/sup:${version} +\`\`\` + +### Architectures +- linux/amd64 +- linux/arm64 + +### Changes +See commit history for details." --generate-notes`; + console.log(` -✨ Release ${version} triggered! +✨ Release ${version} complete! -GitHub Actions will now: - 1. Build Docker images - 2. Push to ghcr.io/lone-cloud/sup-server:${version} - 3. Push to ghcr.io/lone-cloud/sup-server:latest +GitHub release: https://github.com/lone-cloud/sup/releases/tag/${version} +GitHub Actions: https://github.com/lone-cloud/sup/actions -Watch the build: - https://github.com/lone-cloud/sup/actions - -Once complete, images will be available: - docker pull ghcr.io/lone-cloud/sup-server:${version} +Once CI completes, images will be available: + docker pull ghcr.io/lone-cloud/sup:${version} `); } catch (error) { console.error('Release failed:', error); diff --git a/server/Dockerfile b/server/Dockerfile index ce47693..72d64ad 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -7,7 +7,7 @@ RUN bun install --frozen-lockfile COPY server ./server -RUN bun build --compile server/index.ts --outfile sup-server +RUN bun build --compile server/index.ts --outfile sup FROM debian:13.3-slim @@ -34,7 +34,7 @@ RUN ARCH=$(uname -m) && \ rm /tmp/libsignal_jni_aarch64.so; \ fi -COPY --from=builder /app/sup-server /usr/local/bin/sup-server +COPY --from=builder /app/sup /usr/local/bin/sup COPY --from=builder /app/server/public /public ENV PATH="/usr/local/signal-cli/bin:${PATH}" @@ -42,4 +42,4 @@ ENV LD_LIBRARY_PATH="/usr/local/signal-cli/lib:${LD_LIBRARY_PATH}" EXPOSE 8080 -CMD ["sup-server"] +CMD ["sup"] diff --git a/server/routes/admin.ts b/server/routes/admin.ts index 4ddb343..0bea228 100644 --- a/server/routes/admin.ts +++ b/server/routes/admin.ts @@ -79,7 +79,7 @@ const handleHealthFragment = async () => { const html = `