diff --git a/.gitignore b/.gitignore
index ca0f3c4f..32d3cbce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,13 +16,15 @@
# production
/build
/public/umami.js
+/public/geo
/lang-compiled
-/lang-formatted
# misc
.DS_Store
.idea
*.iml
+*.log
+.vscode/*
# debug
npm-debug.log*
diff --git a/Dockerfile b/Dockerfile
index 871b8a87..31ea0054 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,15 +1,41 @@
-FROM node:12.18-alpine
-
+# Build image
+FROM node:12.18-alpine AS build
ARG DATABASE_TYPE
-
ENV DATABASE_URL "postgresql://umami:umami@db:5432/umami" \
DATABASE_TYPE=$DATABASE_TYPE
+WORKDIR /build
-COPY . /app
+RUN yarn config set --home enableTelemetry 0
+COPY package.json yarn.lock /build/
+
+# Install only the production dependencies
+RUN yarn install --production --frozen-lockfile
+
+# Cache these modules for production
+RUN cp -R node_modules/ prod_node_modules/
+
+# Install development dependencies
+RUN yarn install --frozen-lockfile
+
+COPY . /build
+RUN yarn next telemetry disable
+RUN yarn build
+
+# Production image
+FROM node:12.18-alpine AS production
WORKDIR /app
-RUN npm install && npm run build
+# Copy cached dependencies
+COPY --from=build /build/prod_node_modules ./node_modules
+
+# Copy generated Prisma client
+COPY --from=build /build/node_modules/.prisma/ ./node_modules/.prisma/
+
+COPY --from=build /build/yarn.lock /build/package.json ./
+COPY --from=build /build/.next ./.next
+COPY --from=build /build/public ./public
+
+USER node
EXPOSE 3000
-
-CMD ["npm", "start"]
+CMD ["yarn", "start"]
diff --git a/Procfile b/Procfile
new file mode 100644
index 00000000..edc6c9a0
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: npm run start-env
diff --git a/assets/bolt.svg b/assets/bolt.svg
new file mode 100644
index 00000000..4654a1eb
--- /dev/null
+++ b/assets/bolt.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/exclamation-triangle.svg b/assets/exclamation-triangle.svg
new file mode 100644
index 00000000..46bef5bc
--- /dev/null
+++ b/assets/exclamation-triangle.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/external-link.svg b/assets/external-link.svg
new file mode 100644
index 00000000..ed09306f
--- /dev/null
+++ b/assets/external-link.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/eye.svg b/assets/eye.svg
new file mode 100644
index 00000000..09c93453
--- /dev/null
+++ b/assets/eye.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/logo.svg b/assets/logo.svg
index eca6048b..c80f1668 100644
--- a/assets/logo.svg
+++ b/assets/logo.svg
@@ -1 +1,2 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/assets/moon.svg b/assets/moon.svg
new file mode 100644
index 00000000..6c8955ae
--- /dev/null
+++ b/assets/moon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/sun.svg b/assets/sun.svg
new file mode 100644
index 00000000..ebc20eb2
--- /dev/null
+++ b/assets/sun.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/visitor.svg b/assets/visitor.svg
new file mode 100644
index 00000000..591873a5
--- /dev/null
+++ b/assets/visitor.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/components/WebsiteDetails.module.css b/components/WebsiteDetails.module.css
deleted file mode 100644
index 4f117ba1..00000000
--- a/components/WebsiteDetails.module.css
+++ /dev/null
@@ -1,59 +0,0 @@
-.chart {
- margin-bottom: 30px;
-}
-
-.view {
- border-top: 1px solid var(--gray300);
-}
-
-.menu {
- font-size: var(--font-size-small);
-}
-
-.content {
- min-height: 600px;
-}
-
-.backButton {
- align-self: flex-start;
- margin-bottom: 16px;
-}
-
-.backButton svg {
- transform: rotate(180deg);
-}
-
-.row {
- border-top: 1px solid var(--gray300);
- min-height: 430px;
-}
-
-.row > [class*='col-'] {
- border-left: 1px solid var(--gray300);
- padding: 0 20px;
-}
-
-.row > [class*='col-']:first-child {
- border-left: 0;
- padding-left: 0;
-}
-
-.row > [class*='col-']:last-child {
- padding-right: 0;
-}
-
-.hidden {
- display: none;
-}
-
-@media only screen and (max-width: 992px) {
- .row {
- border: 0;
- }
-
- .row > [class*='col-'] {
- border-top: 1px solid var(--gray300);
- border-left: 0;
- padding: 0;
- }
-}
diff --git a/components/common/Button.js b/components/common/Button.js
index b973b36e..5e92d0d8 100644
--- a/components/common/Button.js
+++ b/components/common/Button.js
@@ -13,7 +13,8 @@ export default function Button({
className,
tooltip,
tooltipId,
- disabled = false,
+ disabled,
+ iconRight,
onClick = () => {},
...props
}) {
@@ -30,14 +31,14 @@ export default function Button({
[styles.action]: variant === 'action',
[styles.danger]: variant === 'danger',
[styles.light]: variant === 'light',
- [styles.disabled]: disabled,
+ [styles.iconRight]: iconRight,
})}
disabled={disabled}
onClick={!disabled ? onClick : null}
{...props}
>
- {icon &&