Skip to content

Commit

Permalink
Huge set of changes to updated deps, simplify some implemenations, an…
Browse files Browse the repository at this point in the history
…d fix bugs...
  • Loading branch information
jeffdc committed Mar 25, 2024
1 parent ed5e377 commit a3a8c61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# COPY package.json yarn.lock ./
# RUN yarn set version berry && yarn install

FROM node:16-alpine as build
FROM node:20-alpine as build
WORKDIR /usr/src/app
COPY . .
# COPY --from=deps /usr/src/app/node_modules ./node_modules
Expand All @@ -29,12 +29,12 @@ RUN yarn generate \
# this gets huge and we do not need it for the final build
RUN rm -rf .next/cache
# these are dev tools related to Prisma that are large and not needed in prod
RUN rm node_modules/@prisma/engines/introspection-engine-linux-musl
RUN rm node_modules/@prisma/engines/migration-engine-linux-musl
RUN rm node_modules/@prisma/engines/prisma-fmt-linux-musl
# RUN rm node_modules/@prisma/engines/introspection-engine-linux-musl
# RUN rm node_modules/@prisma/engines/migration-engine-linux-musl
# RUN rm node_modules/@prisma/engines/prisma-fmt-linux-musl

## Shrink final image, copy built nextjs and startup the server
FROM node:16-alpine
FROM node:20-alpine

WORKDIR /usr/src/app
ENV NODE_ENV production
Expand Down
6 changes: 3 additions & 3 deletions components/addimage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import axios from 'axios';
import * as O from 'fp-ts/lib/Option';
import { useSession } from 'next-auth/react';
import React, { ChangeEvent, useState } from 'react';
import { ChangeEvent, useState } from 'react';
import { Alert, Col, ProgressBar, Row } from 'react-bootstrap';
import { toast } from 'react-hot-toast';
import { ImageApi, ImageLicenseValues } from '../libs/api/apitypes';
Expand Down Expand Up @@ -103,7 +102,7 @@ const AddImage = ({ id, onChange }: Props): JSX.Element => {
licenselink: '',
path: path,
sourcelink: '',
source: O.none,
source: null,
uploader: sessionUserOrUnknown(session?.user?.name),
lastchangedby: sessionUserOrUnknown(session?.user?.name),
speciesid: id,
Expand All @@ -114,6 +113,7 @@ const AddImage = ({ id, onChange }: Props): JSX.Element => {
large: '',
xlarge: '',
original: '',
source_id: null,
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion pages/admin/speciessource.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const SpeciesSource = ({ speciesid, allSpecies, allSources }: Props): JSX.Elemen
const insertData: SpeciesSourceInsertFields = {
id: selSo.id,
species: selected.id,
source: selSo.source_id,
source: selSo.source_id ?? -1,
description: description ? description : '',
useasdefault: fields.useasdefault,
externallink: fields.externallink,
Expand Down

0 comments on commit a3a8c61

Please sign in to comment.