move build to cmd
This commit is contained in:
parent
14f06a4ddb
commit
20876562a6
|
@ -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"]
|
||||
|
|
|
@ -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);
|
||||
|
|
Reference in New Issue