Skip to content

Commit

Permalink
Feat: app upgrade (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Age Manning <Age@AgeManning.com>
  • Loading branch information
rickimoore and AgeManning committed Feb 28, 2023
1 parent cbc30e0 commit 4da71a9
Show file tree
Hide file tree
Showing 8 changed files with 2,867 additions and 2,481 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG node_version=18
ARG node_image=node:${node_version}

# STAGE 1: builder
FROM $node_image AS builder

COPY . /app/
WORKDIR /app

ENV NODE_ENV=development
# install (dev) deps
RUN yarn

ENV NODE_ENV=production
# build (prod) app
RUN yarn build

# STAGE 2
FROM nginx:alpine AS production

COPY --from=builder /app/build/ /usr/share/nginx/html/
12 changes: 12 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG node_version=18
ARG node_image=node:${node_version}
FROM $node_image

ENV NODE_ENV=development

EXPOSE 5000/tcp
COPY . /app/
WORKDIR /app

RUN yarn install
CMD ["yarn", "run", "dev"]
2 changes: 0 additions & 2 deletions Procfile

This file was deleted.

6 changes: 1 addition & 5 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ module.exports = {
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
icon: 'src/assets/images/sigma',
},
},
config: {},
},
{
name: '@electron-forge/maker-rpm',
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,13 @@
"yup": "^0.32.11"
},
"scripts": {
"dev": "nf start",
"dev": "electron .",
"start": "BROWSER=none react-scripts start",
"build": "react-scripts build",
"test": "jest",
"coverage": "jest --coverage",
"eject": "react-scripts eject",
"electron": "WEB_URL=http://localhost:3000 electron .",
"electron-prd": "electron .",
"electron-forge": "WEB_URL=http://localhost:3000 electron-forge start",
"electron-forge-prd": "electron-forge start",
"build-all": "npm run build; npm run make",
"build-all": "yarn build && yarn make",
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public",
"test-storybook": "test-storybook",
Expand Down
28 changes: 0 additions & 28 deletions src/electron-wait-react.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/hooks/useApiValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const useApiValidation = (path: string, type: ApiType, isToastAlert: boolean, da
} as ToastOptions

if (code === 'ERR_NETWORK') {
toast.error(t('error.networkError', { type }), options)
toast.error(t('error.networkError', { type }) as string, options)
} else {
toast.error(t('error.unknownError', { type }), options)
toast.error(t('error.unknownError', { type }) as string, options)
}
}
}),
Expand Down
5,267 changes: 2,829 additions & 2,438 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 4da71a9

Please sign in to comment.