fix: dockerfile and small changes

This commit is contained in:
AP 2020-04-13 07:30:19 +02:00
parent 5165ee808e
commit 6aebc91908
4 changed files with 28 additions and 26 deletions

View File

@ -9,4 +9,5 @@
/.github
.env
.vscode
.storybook
CHANGELOG.md

View File

@ -1,16 +1,16 @@
FROM node:alpine
# Create app directory
# RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn install --production=true
RUN npm install --only=prod
RUN npm install cross-env
# Bundle app source
COPY . /usr/src/app
RUN yarn build
RUN npm run build
EXPOSE 3000
CMD [ "yarn", "start" ]
CMD [ "npm", "run", "start" ]

View File

@ -68,7 +68,6 @@
"@storybook/react": "^5.3.18",
"@types/node": "^13.11.1",
"@types/react": "^16.9.34",
"@types/storybook__react": "^5.2.1",
"babel-loader": "^8.1.0",
"babel-plugin-inline-react-svg": "^1.1.1",
"babel-plugin-styled-components": "^1.10.7",

View File

@ -1,11 +1,12 @@
import React from 'react';
import ScaleLoader from 'react-spinners/ScaleLoader';
import styled from 'styled-components';
import { SubTitle, Card, SingleLine } from '../generic/Styled';
import { SubTitle, Card } from '../generic/Styled';
import { themeColors, mediaWidths, fontColors } from '../../styles/Themes';
import { Link } from '../link/Link';
import { ColorButton } from '../buttons/colorButton/ColorButton';
import { SectionTitle } from '../typography/Styled';
import { CurrentSettings } from '../../views/settings/Current';
import { AccountSettings } from '../../views/settings/Account';
import { DangerView } from '../../views/settings/Danger';
const FullDiv = styled.div`
display: flex;
@ -45,21 +46,22 @@ const StyledParagraph = styled.p`
`;
export const ErrorView = () => (
<Card>
<StyledTitle textColor={fontColors.blue3}>Connection Error</StyledTitle>
<StyledParagraph>
ThunderHub was unable to connect to your node.
</StyledParagraph>
<StyledParagraph>
Please make sure it's online and that the connection details are correct.
</StyledParagraph>
<StyledSubtitle>If the problem persists please contact us.</StyledSubtitle>
<SingleLine>
<ColorButton fullWidth={true} withMargin={'16px 0 0'} arrow={true}>
<Link to={'/settings'} inheritColor={true}>
Go to settings
</Link>
</ColorButton>
</SingleLine>
</Card>
<>
<Card>
<StyledTitle textColor={fontColors.blue3}>Connection Error</StyledTitle>
<StyledParagraph>
ThunderHub was unable to connect to your node.
</StyledParagraph>
<StyledParagraph>
Please make sure it's online and that the connection details are
correct.
</StyledParagraph>
<StyledSubtitle>
If the problem persists please contact us.
</StyledSubtitle>
</Card>
<CurrentSettings />
<AccountSettings />
<DangerView />
</>
);