Skip to content

Commit

Permalink
fix: solve release issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomez committed Nov 17, 2024
1 parent f0e35b4 commit 50aa15b
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 55 deletions.
21 changes: 0 additions & 21 deletions .fleet/frontend-deployment.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions .fleet/frontend-service.yaml

This file was deleted.

18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:20-alpine AS base
RUN corepack enable
RUN corepack enable pnpm

# Install dependencies only when needed
FROM base AS deps
Expand All @@ -10,9 +10,9 @@ FROM base AS deps
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
if [ -f yarn.lock ]; then yarn install --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then pnpm i --frozen-lockfile; \
elif [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi

Expand All @@ -26,7 +26,7 @@ FROM base AS builder
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED=1

RUN pnpm run build

Expand All @@ -37,9 +37,9 @@ FROM base AS builder
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NODE_ENV=production
# Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED=1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
Expand All @@ -61,8 +61,8 @@ FROM base AS runner

EXPOSE 3000

ENV PORT 3000
ENV PORT=3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"
ENV HOSTNAME="0.0.0.0"

CMD pnpm dlx prisma migrate deploy && node server.js
CMD ["/bin/sh", "-c", "pnpm dlx prisma migrate deploy && node server.js"]
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"start": "next start",
"lint": "next lint",
"prepare": "husky",
"postinstall": "pnpm dlx prisma generate",
"test": "vitest",
"coverage": "vitest run --coverage",
"test:ci": "NODE_ENV=test vitest --watch=false",
Expand Down
4 changes: 2 additions & 2 deletions src/app/(auth)/actions/sign-out-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import { signOut } from '@/lib/auth/auth'

export async function signOutAction() {
export async function signOutAction(): Promise<void> {
try {
return signOut({ redirectTo: '/' })
} catch (error) {
console.error(`ERROR IN SIGN OUT: ${(error as Error).toString()}`)
if ((error as Error).message) {
return (error as Error).message
return
}

throw error
Expand Down
2 changes: 1 addition & 1 deletion src/app/(auth)/components/sign-in-email-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function SignInEmailForm() {
variant="bordered"
/>
<Button
className={` w-full`}
className={`w-full`}
radius="none"
size="lg"
startContent={<EnvelopeIcon height={24} width={24} />}
Expand Down
4 changes: 1 addition & 3 deletions src/app/books/components/book-import-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { showToast } from '@/components/form/toast'
import { importBook } from '@/core/book/infrastructure/actions/import-book'
import { FormResponse } from '@/lib/zod/form-response'

interface BookImportFormProperties {}

export function BookImportForm({}: BookImportFormProperties) {
export function BookImportForm() {
const formData = {
asin: '',
id: '',
Expand Down
1 change: 0 additions & 1 deletion src/app/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ export default function Icon() {
},
)
}
;``
2 changes: 1 addition & 1 deletion src/components/form/score-input-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useState } from 'react'

import { StarIcon } from '@/components/image/star-icon'

interface ScoreInputFormProperties extends RadioGroupProps {}
type ScoreInputFormProperties = RadioGroupProps

const STARS = ['1', '2', '3', '4', '5']
const DEFAULT_SCORE = '5'
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function Toast(properties: ToastProperties) {
<CheckCircleIcon height={20} width={20} />
<span className="sr-only">Check icon</span>
</div>
<div className="ms-3 font-normal">{message}</div>
<div className="ms-3 font-normal">{message}</div>
<button
aria-label="Close"
className="-mx-1.5 -my-1.5 ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/auth/auth.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const authConfig = {
roles: 'ROLE_ADMIN',
},
{
path: '^/books/\\w+/edit',
path: String.raw`^/books/\w+/edit`,
roles: 'ROLE_ADMIN',
},
{
Expand Down

0 comments on commit 50aa15b

Please sign in to comment.