Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release dashboard #145

Merged
merged 4 commits into from
Jan 15, 2025
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ jobs:
- name: Run Prettier
run: yarn fm:check

- name: Run Typecheck
run: yarn ts
- name: Run build
run: yarn build
49 changes: 48 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "v*"

jobs:
release:
release-swissknife:
permissions:
contents: write
id-token: write
Expand Down Expand Up @@ -51,3 +51,50 @@ jobs:
subject-name: docker.io/bitcoinnumeraire/swissknife
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

release-dashboard:
permissions:
contents: write
id-token: write
attestations: write

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: bitcoinnumeraire/swissknife-dashboard

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ./dashboard
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: docker.io/bitcoinnumeraire/swissknife-dashboard
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "swissknife"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
authors = ["Dario Anongba Varela <dario.varela@numeraire.tech>"]
rust-version = "1.79"
Expand Down
1 change: 1 addition & 0 deletions config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ leeway = "60s"

[jwt]
token_expiry = "1h"
secret = "CHANGE_ME"

# Database
[database]
Expand Down
13 changes: 3 additions & 10 deletions dashboard/.env.production
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
LN_PROVIDER=cln
LN_PROVIDER=lnd

# App
NEXT_PUBLIC_SERVER_URL=https://api.numeraire.tech
NEXT_PUBLIC_AUTH_METHOD=auth0
NEXT_PUBLIC_APPNAME="Numeraire Dashboard"

# Auth0
NEXT_PUBLIC_AUTH0_DOMAIN=auth.numeraire.tech
NEXT_PUBLIC_AUTH0_CLIENT_ID=7Jh0DPs8JoAHNrdTbIYKVDty7YNPWbSM
NEXT_PUBLIC_AUTH0_CALLBACK_URL=https://app.numeraire.tech/login/callback
NEXT_PUBLIC_AUTH0_AUDIENCE=https://swissknife.numeraire.tech/api/v1
NEXT_PUBLIC_SERVER_URL=server:3000
NEXT_PUBLIC_AUTH_METHOD=jwt
6 changes: 3 additions & 3 deletions dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ RUN chown -R nextjs:nodejs /app

USER nextjs

EXPOSE 3000
EXPOSE 8080

ENV PORT=3000
ENV PORT=8080
# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "server.js"]
CMD ["node", "server.js"]
15 changes: 1 addition & 14 deletions dashboard/src/auth/view/jwt/jwt-sign-in-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ import { useBoolean } from 'minimal-shared/hooks';
import { zodResolver } from '@hookform/resolvers/zod';

import Box from '@mui/material/Box';
import Link from '@mui/material/Link';
import IconButton from '@mui/material/IconButton';
import LoadingButton from '@mui/lab/LoadingButton';
import InputAdornment from '@mui/material/InputAdornment';

import { paths } from 'src/routes/paths';
import { useRouter } from 'src/routes/hooks';
import { RouterLink } from 'src/routes/components';

import { handleActionError } from 'src/utils/errors';

Expand Down Expand Up @@ -113,17 +110,7 @@ export function JwtSignInView() {
<>
<AnimateLogoRotate sx={{ mb: 3, mx: 'auto' }} />

<FormHead
title={t('sign_in.sign_in_to_your_account')}
description={
<>
{`Don’t have an account? `}
<Link component={RouterLink} href={paths.auth.jwt.signUp} variant="subtitle2">
Get started
</Link>
</>
}
/>
<FormHead title={t('sign_in.sign_in_to_your_account')} />

<Form methods={methods} onSubmit={onSubmit}>
{renderForm()}
Expand Down
2 changes: 1 addition & 1 deletion migration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "migration"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
publish = false

Expand Down
Loading