diff --git a/packages/dashboard/Dockerfile b/packages/dashboard/Dockerfile index f844b534..8eaa2590 100644 --- a/packages/dashboard/Dockerfile +++ b/packages/dashboard/Dockerfile @@ -2,13 +2,15 @@ FROM node:15.8.0-alpine WORKDIR /usr/app -COPY public ./public -COPY src ./src -COPY styles ./styles COPY package.json . -COPY postcss.config.js . -COPY tailwind.config.js . ENV NEXT_TELEMETRY_DISABLED 1 RUN yarn --no-lockfile + +COPY public ./public +COPY src ./src +COPY styles ./styles +COPY postcss.config.js . +COPY tailwind.config.js . + CMD ["sh", "-c", "yarn build && yarn start"] diff --git a/packages/dashboard/src/pages/uploads.js b/packages/dashboard/src/pages/uploads.js index a942d863..ee718b43 100644 --- a/packages/dashboard/src/pages/uploads.js +++ b/packages/dashboard/src/pages/uploads.js @@ -10,8 +10,7 @@ import { SkynetClient } from "skynet-js"; const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : ""; const fetcher = (url) => fetch(url).then((r) => r.json()); -export const getServerSideProps = authServerSideProps(); -export const getStaticProps = () => { +export const getServerSideProps = authServerSideProps(() => { const skynetClient = new SkynetClient(process.env.SKYNET_PORTAL_API); const getSkylinkLink = ({ skylink }) => skynetClient.getSkylinkUrl(skylink); const getRelativeDate = ({ uploadedOn }) => dayjs(uploadedOn).format("YYYY-MM-DD HH:mm:ss"); @@ -24,7 +23,7 @@ export const getStaticProps = () => { const actions = []; return { props: { headers, actions } }; -}; +}); export default function Uploads({ headers, actions }) { const [offset, setOffset] = useState(0);