diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 259b4cf..808f1d0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,18 +1,23 @@ name: Docker Build and Push on: + workflow_dispatch: push: branches: - main - master +env: + REGISTRY_NAME: ghcr.io + IMAGE_NAME: nostr-rs-relay + jobs: - ci: - name: CI - uses: ./.github/workflows/ci.yml + # ci: + # name: CI + # uses: ./.github/workflows/ci.yml build_and_push: - needs: [ci] + # needs: [ci] name: Build and Push runs-on: ubuntu-latest steps: @@ -32,13 +37,29 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push + - name: Collecting Metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY_NAME }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} + + - name: Building And Pushing Image id: docker_build uses: docker/build-push-action@v4 with: context: . + file: ./Dockerfile push: true - tags: ghcr.io/${{ github.repository_owner }}/nostr-rs-relay:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + # - name: Build and push + # id: docker_build + # uses: docker/build-push-action@v4 + # with: + # context: . + # push: true + # tags: ghcr.io/${{ github.repository_owner }}/nostr-rs-relay:latest - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file diff --git a/src/server.rs b/src/server.rs index 3c2b9f2..be1073b 100644 --- a/src/server.rs +++ b/src/server.rs @@ -266,73 +266,82 @@ async fn handle_web_request( } let html = r#" - - - - - - -
-

Enter your pubkey

-
-

- -

- -
- -
- - - + + + + + + + + + Join Nostr - Enter your pubkey + + + +
+
+
+

Enter your pubkey

+
+
+ +
+
+ + +
+
+ +
+
+
+ +
+
+
+
+ + + + + + + + + + "#; Ok(Response::builder() .status(StatusCode::OK) @@ -445,89 +454,94 @@ async fn handle_web_request( let html_result = format!( r#" - - - - - - - -
-

- To use this relay, an admission fee of {} sats is required. By paying the fee, you agree to the terms. -

-
-
-
- {} -
-
-
-
-

{}

- -
-
-

This page will not refresh

-

Verify admission here once you have paid

-
-
- - - - - + + + + + + + + + Join Nostr - Invoice + + + +
+
+
+

+ To use this relay, an admission fee of {} sats is required. By paying the fee, you agree to the terms. +

+ +
+ {} +
+ +
+

{}

+ +
+ +
+

This page will not refresh

+

Verify admission here once you have paid

+
+
+
+
+ + + + + + + + + + "#, settings.pay_to_relay.admission_cost, qr_code, invoice_info.bolt11, - pubkey, - invoice_info.bolt11 + pubkey ); Ok(Response::builder() @@ -582,30 +596,41 @@ async fn handle_web_request( let html_result = format!( r#" - - - - - - - -
-
{} {} admitted
-
- - - + + + + + + + + + Bootstrap Admissions + + + +
+
{ } { } admitted
+
+ + + + + + + "#, pubkey, text