ops(dashboard-v2): prepare Dockerfile (#1971)

* ops(dashboard-v2): prepare Dockerfile

* ops(dashboard-v2): lint dashboard-v2/Dockerfile
This commit is contained in:
Michał Leszczyk 2022-04-07 12:59:20 +02:00 committed by GitHub
parent 7bd54359e6
commit 688dbbd52f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 42 additions and 6 deletions

View File

@ -16,6 +16,7 @@ jobs:
- docker/nginx/Dockerfile
- docker/sia/Dockerfile
- packages/dashboard/Dockerfile
- packages/dashboard-v2/Dockerfile
- packages/dnslink-api/Dockerfile
- packages/handshake-api/Dockerfile
- packages/health-check/Dockerfile

View File

@ -75,3 +75,25 @@ services:
- 3000
depends_on:
- 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

View File

@ -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"]

View File

@ -18,7 +18,7 @@ module.exports = {
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "./src/images/",
path: "./static/images/",
},
__key: "images",
},

View File

@ -17,7 +17,6 @@ export default function useUpgradeRedirect() {
if (isDataLoaded) {
if (settings.isSubscriptionRequired && !hasPaidSubscription) {
console.log("redirecting", user, settings);
navigate("/upgrade");
} else {
setVerifyingSubscription(false);

View File

@ -5,7 +5,7 @@ import { SWRConfig } from "swr";
import { authenticatedOnly } from "../lib/swrConfig";
import { PageContainer } from "../components/PageContainer";
import { NavBar } from "../components/Navbar";
import { NavBar } from "../components/NavBar";
import { Footer } from "../components/Footer";
import { UserProvider, useUser } from "../contexts/user";
import { FullScreenLoadingIndicator } from "../components/LoadingIndicator";

View File

@ -6,7 +6,7 @@ import { SWRConfig } from "swr";
import { authenticatedOnly } from "../lib/swrConfig";
import { PageContainer } from "../components/PageContainer";
import { NavBar } from "../components/Navbar";
import { NavBar } from "../components/NavBar";
import { Footer } from "../components/Footer";
import { UserProvider, useUser } from "../contexts/user";
import { ContainerLoadingIndicator } from "../components/LoadingIndicator";

View File

@ -15,7 +15,7 @@ const FreePortalHeader = () => {
const { plans } = usePlans();
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 (
<div className="mt-4 mb-8 font-sans">

View File

@ -14090,7 +14090,7 @@ sjcl@^1.0.8:
resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a"
integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ==
skynet-js@^4.0.27-beta:
skynet-js@4.0.27-beta:
version "4.0.27-beta"
resolved "https://registry.yarnpkg.com/skynet-js/-/skynet-js-4.0.27-beta.tgz#4257bffda8757830656e0beb89d0d2e44da17e2f"
integrity sha512-JV+QE/2l2YwVN1jQHVMFXgggwtBrPAnuyXySbLgafEJAde5dUwSEr5YRMV+3LvEgYkGhxSb74pyq0u0wrF2sUg==