diff --git a/Dockerfile b/Dockerfile index e6cc888c..48f3df32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,11 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -ARG DATABASE_URL ARG DATABASE_TYPE ARG BASE_PATH -ARG DISABLE_LOGIN -ENV DATABASE_URL $DATABASE_URL ENV DATABASE_TYPE $DATABASE_TYPE ENV BASE_PATH $BASE_PATH -ENV DISABLE_LOGIN $DISABLE_LOGIN ENV NEXT_TELEMETRY_DISABLED 1 @@ -36,12 +32,11 @@ ENV NEXT_TELEMETRY_DISABLED 1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs -RUN yarn global add prisma -RUN yarn add npm-run-all dotenv +RUN yarn add npm-run-all dotenv prisma # You only need to copy next.config.js if you are NOT using the default configuration COPY --from=builder /app/next.config.js . -COPY --from=builder /app/public ./public +COPY --from=builder --chown=nextjs:nodejs /app/public ./public COPY --from=builder /app/package.json ./package.json COPY --from=builder /app/prisma ./prisma COPY --from=builder /app/scripts ./scripts diff --git a/Procfile b/Procfile deleted file mode 100644 index edc6c9a0..00000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: npm run start-env diff --git a/components/common/UpdateNotice.js b/components/common/UpdateNotice.js index a5036808..8bba1694 100644 --- a/components/common/UpdateNotice.js +++ b/components/common/UpdateNotice.js @@ -30,7 +30,7 @@ export default function UpdateNotice() { if (!checked) { checkVersion(); } - }, []); + }, [checked]); if (!hasUpdate || dismissed) { return null; diff --git a/components/forms/TrackingCodeForm.js b/components/forms/TrackingCodeForm.js index fd679ab2..e75260f7 100644 --- a/components/forms/TrackingCodeForm.js +++ b/components/forms/TrackingCodeForm.js @@ -4,10 +4,12 @@ import { useRouter } from 'next/router'; import Button from 'components/common/Button'; import FormLayout, { FormButtons, FormRow } from 'components/layout/FormLayout'; import CopyButton from 'components/common/CopyButton'; +import useConfig from 'hooks/useConfig'; export default function TrackingCodeForm({ values, onClose }) { const ref = useRef(); const { basePath } = useRouter(); + const { trackerScriptName } = useConfig(); return ( @@ -24,7 +26,9 @@ export default function TrackingCodeForm({ values, onClose }) { rows={3} cols={60} spellCheck={false} - defaultValue={``} + defaultValue={``} readOnly /> diff --git a/components/layout/Footer.js b/components/layout/Footer.js index ff7db96c..c8035fef 100644 --- a/components/layout/Footer.js +++ b/components/layout/Footer.js @@ -1,13 +1,13 @@ -import React from 'react'; +import { useRouter } from 'next/router'; +import Script from 'next/script'; import classNames from 'classnames'; import { FormattedMessage } from 'react-intl'; import Link from 'components/common/Link'; import styles from './Footer.module.css'; -import useStore from 'store/version'; -import { HOMEPAGE_URL, REPO_URL } from 'lib/constants'; +import { CURRENT_VERSION, HOMEPAGE_URL, REPO_URL } from 'lib/constants'; export default function Footer() { - const { current } = useStore(); + const { pathname } = useRouter(); return (