ops(dashboard-v2): prepare Dockerfile
This commit is contained in:
parent
1a0fb9a806
commit
91be333fb9
|
@ -75,3 +75,25 @@ services:
|
||||||
- 3000
|
- 3000
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongo
|
- mongo
|
||||||
|
|
||||||
|
dashboard-v2:
|
||||||
|
build:
|
||||||
|
context: ./packages/dashboard-v2
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: dashboard-v2
|
||||||
|
restart: unless-stopped
|
||||||
|
logging: *default-logging
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- GATSBY_PORTAL_DOMAIN=${PORTAL_DOMAIN}
|
||||||
|
volumes:
|
||||||
|
- ./docker/data/dashboard-v2/.cache:/usr/app/.cache
|
||||||
|
- ./docker/data/dashboard-v2/public:/usr/app/public
|
||||||
|
networks:
|
||||||
|
shared:
|
||||||
|
ipv4_address: 10.10.10.90
|
||||||
|
expose:
|
||||||
|
- 9000
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM node:16.14.2-alpine
|
||||||
|
|
||||||
|
WORKDIR /usr/app
|
||||||
|
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
|
||||||
|
RUN yarn --frozen-lockfile
|
||||||
|
|
||||||
|
COPY static ./static
|
||||||
|
COPY src ./src
|
||||||
|
COPY gatsby*.js ./
|
||||||
|
COPY postcss.config.js tailwind.config.js ./
|
||||||
|
|
||||||
|
CMD ["sh", "-c", "yarn build && yarn serve --host 0.0.0.0 -p 9000"]
|
|
@ -18,7 +18,7 @@ module.exports = {
|
||||||
resolve: "gatsby-source-filesystem",
|
resolve: "gatsby-source-filesystem",
|
||||||
options: {
|
options: {
|
||||||
name: "images",
|
name: "images",
|
||||||
path: "./src/images/",
|
path: "./static/images/",
|
||||||
},
|
},
|
||||||
__key: "images",
|
__key: "images",
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,6 @@ export default function useUpgradeRedirect() {
|
||||||
|
|
||||||
if (isDataLoaded) {
|
if (isDataLoaded) {
|
||||||
if (settings.isSubscriptionRequired && !hasPaidSubscription) {
|
if (settings.isSubscriptionRequired && !hasPaidSubscription) {
|
||||||
console.log("redirecting", user, settings);
|
|
||||||
navigate("/upgrade");
|
navigate("/upgrade");
|
||||||
} else {
|
} else {
|
||||||
setVerifyingSubscription(false);
|
setVerifyingSubscription(false);
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { SWRConfig } from "swr";
|
||||||
import { authenticatedOnly } from "../lib/swrConfig";
|
import { authenticatedOnly } from "../lib/swrConfig";
|
||||||
|
|
||||||
import { PageContainer } from "../components/PageContainer";
|
import { PageContainer } from "../components/PageContainer";
|
||||||
import { NavBar } from "../components/Navbar";
|
import { NavBar } from "../components/NavBar";
|
||||||
import { Footer } from "../components/Footer";
|
import { Footer } from "../components/Footer";
|
||||||
import { UserProvider, useUser } from "../contexts/user";
|
import { UserProvider, useUser } from "../contexts/user";
|
||||||
import { FullScreenLoadingIndicator } from "../components/LoadingIndicator";
|
import { FullScreenLoadingIndicator } from "../components/LoadingIndicator";
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { SWRConfig } from "swr";
|
||||||
import { authenticatedOnly } from "../lib/swrConfig";
|
import { authenticatedOnly } from "../lib/swrConfig";
|
||||||
|
|
||||||
import { PageContainer } from "../components/PageContainer";
|
import { PageContainer } from "../components/PageContainer";
|
||||||
import { NavBar } from "../components/Navbar";
|
import { NavBar } from "../components/NavBar";
|
||||||
import { Footer } from "../components/Footer";
|
import { Footer } from "../components/Footer";
|
||||||
import { UserProvider, useUser } from "../contexts/user";
|
import { UserProvider, useUser } from "../contexts/user";
|
||||||
import { ContainerLoadingIndicator } from "../components/LoadingIndicator";
|
import { ContainerLoadingIndicator } from "../components/LoadingIndicator";
|
||||||
|
|
|
@ -15,7 +15,7 @@ const FreePortalHeader = () => {
|
||||||
const { plans } = usePlans();
|
const { plans } = usePlans();
|
||||||
|
|
||||||
const freePlan = plans.find(({ price }) => price === 0);
|
const freePlan = plans.find(({ price }) => price === 0);
|
||||||
const freeStorage = freePlan ? bytes(freePlan.limits?.storageLimit, { binary: true }) : null;
|
const freeStorage = freePlan?.limits ? bytes(freePlan.limits?.storageLimit, { binary: true }) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-4 mb-8 font-sans">
|
<div className="mt-4 mb-8 font-sans">
|
||||||
|
|
|
@ -14090,7 +14090,7 @@ sjcl@^1.0.8:
|
||||||
resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a"
|
resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a"
|
||||||
integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ==
|
integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ==
|
||||||
|
|
||||||
skynet-js@^4.0.27-beta:
|
skynet-js@4.0.27-beta:
|
||||||
version "4.0.27-beta"
|
version "4.0.27-beta"
|
||||||
resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.27-beta.tgz#4257bffda8757830656e0beb89d0d2e44da17e2f"
|
resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.27-beta.tgz#4257bffda8757830656e0beb89d0d2e44da17e2f"
|
||||||
integrity sha512-JV+QE/2l2YwVN1jQHVMFXgggwtBrPAnuyXySbLgafEJAde5dUwSEr5YRMV+3LvEgYkGhxSb74pyq0u0wrF2sUg==
|
integrity sha512-JV+QE/2l2YwVN1jQHVMFXgggwtBrPAnuyXySbLgafEJAde5dUwSEr5YRMV+3LvEgYkGhxSb74pyq0u0wrF2sUg==
|
||||||
|
|
Reference in New Issue