Skip to content

Commit

Permalink
Merge branch 'develop' into pablo/add-holesky
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo authored Oct 31, 2023
2 parents 705278d + 25ef373 commit 6dba2e3
Show file tree
Hide file tree
Showing 344 changed files with 3,163 additions and 2,675 deletions.
72 changes: 66 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ COPY packages/hostScripts/package.json \
packages/hostScripts/
COPY packages/db/package.json \
packages/db/
COPY packages/manifest/package.json \
packages/manifest/
COPY packages/ipfs/package.json \
packages/ipfs/
COPY packages/installer/package.json \
packages/installer/
COPY packages/ethicalMetrics/package.json \
packages/ethicalMetrics/
COPY packages/httpsPortal/package.json \
packages/httpsPortal/
RUN yarn --frozen-lockfile --non-interactive --ignore-optional

# Build order must be as follows:
Expand All @@ -71,6 +81,12 @@ COPY packages/params/ .
RUN yarn build
# Results in dist/*

# Build ethicalmetrics
WORKDIR /app/packages/ethicalMetrics/
COPY packages/ethicalMetrics/ .
RUN yarn build
# Results in dist/*

# Build common
WORKDIR /app/packages/common/
COPY packages/common/ .
Expand All @@ -89,36 +105,60 @@ COPY packages/eventBus/ .
RUN yarn build
# Results in dist/*

# Build dockerCompose
WORKDIR /app/packages/dockerCompose/
COPY packages/dockerCompose/ .
RUN yarn build
# Results in dist/*

# Build logger
WORKDIR /app/packages/logger/
COPY packages/logger/ .
RUN yarn build
# Results in dist/*

# Build dockerCompose
WORKDIR /app/packages/dockerCompose/
COPY packages/dockerCompose/ .
RUN yarn build
# Results in dist/*

# Build hostScripts
WORKDIR /app/packages/hostScripts/
COPY packages/hostScripts/ .
RUN yarn build
# Results in dist/*

# Build manifest
WORKDIR /app/packages/manifest/
COPY packages/manifest/ .
RUN yarn build
# Results in dist/*

# Build dockerApi
WORKDIR /app/packages/dockerApi/
COPY packages/dockerApi/ .
RUN yarn build
# Results in dist/*

# Build httpsportal
WORKDIR /app/packages/httpsPortal/
COPY packages/httpsPortal/ .
RUN yarn build
# Results in dist/*

# Build db
WORKDIR /app/packages/db/
COPY packages/db/ .
RUN yarn build
# Results in dist/*

# Build ipfs
WORKDIR /app/packages/ipfs/
COPY packages/ipfs/ .
RUN yarn build
# Results in dist/*

# Build installer
WORKDIR /app/packages/installer/
COPY packages/installer/ .
RUN yarn build
# Results in dist/*

# Build dappmanager
WORKDIR /app/packages/dappmanager/
COPY packages/dappmanager/ .
Expand Down Expand Up @@ -220,5 +260,25 @@ COPY --from=build-deps /usr/src/app/packages/hostScripts/package.json /usr/src/a
COPY --from=build-deps /usr/src/app/packages/db/dist /usr/src/app/packages/db/dist
COPY --from=build-deps /usr/src/app/packages/db/node_modules /usr/src/app/packages/db/node_modules
COPY --from=build-deps /usr/src/app/packages/db/package.json /usr/src/app/packages/db/package.json
# Copyt manifest
COPY --from=build-deps /usr/src/app/packages/manifest/dist /usr/src/app/packages/manifest/dist
COPY --from=build-deps /usr/src/app/packages/manifest/node_modules /usr/src/app/packages/manifest/node_modules
COPY --from=build-deps /usr/src/app/packages/manifest/package.json /usr/src/app/packages/manifest/package.json
# Copyt installer
COPY --from=build-deps /usr/src/app/packages/installer/dist /usr/src/app/packages/installer/dist
COPY --from=build-deps /usr/src/app/packages/installer/node_modules /usr/src/app/packages/installer/node_modules
COPY --from=build-deps /usr/src/app/packages/installer/package.json /usr/src/app/packages/installer/package.json
# Copyt httpsportal
COPY --from=build-deps /usr/src/app/packages/httpsPortal/dist /usr/src/app/packages/httpsPortal/dist
COPY --from=build-deps /usr/src/app/packages/httpsPortal/node_modules /usr/src/app/packages/httpsPortal/node_modules
COPY --from=build-deps /usr/src/app/packages/httpsPortal/package.json /usr/src/app/packages/httpsPortal/package.json
# Copy ipfs
COPY --from=build-deps /usr/src/app/packages/ipfs/dist /usr/src/app/packages/ipfs/dist
COPY --from=build-deps /usr/src/app/packages/ipfs/node_modules /usr/src/app/packages/ipfs/node_modules
COPY --from=build-deps /usr/src/app/packages/ipfs/package.json /usr/src/app/packages/ipfs/package.json
# Copy ethicalmetrics
COPY --from=build-deps /usr/src/app/packages/ethicalMetrics/dist /usr/src/app/packages/ethicalMetrics/dist
COPY --from=build-deps /usr/src/app/packages/ethicalMetrics/node_modules /usr/src/app/packages/ethicalMetrics/node_modules
COPY --from=build-deps /usr/src/app/packages/ethicalMetrics/package.json /usr/src/app/packages/ethicalMetrics/package.json

CMD [ "node", "packages/dappmanager/dist/index" ]
46 changes: 40 additions & 6 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ COPY packages/hostScripts/package.json \
packages/hostScripts/
COPY packages/db/package.json \
packages/db/
COPY packages/manifest/package.json \
packages/manifest/
COPY packages/ipfs/package.json \
packages/ipfs/
COPY packages/installer/package.json \
packages/installer/
COPY packages/ethicalMetrics/package.json \
packages/ethicalMetrics/
COPY packages/httpsPortal/package.json \
packages/httpsPortal/
RUN yarn --frozen-lockfile --non-interactive --ignore-optional

# Build params
Expand All @@ -78,6 +88,12 @@ COPY packages/params/ .
RUN yarn build
# Results in dist/*

# Build ethicalmetrics
WORKDIR /app/packages/ethicalMetrics/
COPY packages/ethicalMetrics/ .
RUN yarn build
# Results in dist/*

# Build common
WORKDIR /app/packages/common/
COPY packages/common/ .
Expand All @@ -96,36 +112,54 @@ COPY packages/eventBus/ .
RUN yarn build
# Results in dist/*

# Build dockerCompose
WORKDIR /app/packages/dockerCompose/
COPY packages/dockerCompose/ .
RUN yarn build
# Results in dist/*

# Build logger
WORKDIR /app/packages/logger/
COPY packages/logger/ .
RUN yarn build
# Results in dist/*

# Build dockerCompose
WORKDIR /app/packages/dockerCompose/
COPY packages/dockerCompose/ .
RUN yarn build
# Results in dist/*

# Build hostScripts
WORKDIR /app/packages/hostScripts/
COPY packages/hostScripts/ .
RUN yarn build
# Results in dist/*

# Build manifest
WORKDIR /app/packages/manifest/
COPY packages/manifest/ .
RUN yarn build
# Results in dist/*

# Build dockerApi
WORKDIR /app/packages/dockerApi/
COPY packages/dockerApi/ .
RUN yarn build
# Results in dist/*

# Build httpsportal
WORKDIR /app/packages/httpsPortal/
COPY packages/httpsPortal/ .
RUN yarn build
# Results in dist/*

# Build db
WORKDIR /app/packages/db/
COPY packages/db/ .
RUN yarn build
# Results in dist/*

# Build ipfs
WORKDIR /app/packages/ipfs/
COPY packages/ipfs/ .
RUN yarn build
# Results in dist/*

# Build dappmanager
WORKDIR /app/packages/dappmanager/
COPY packages/dappmanager/ .
Expand Down
3 changes: 1 addition & 2 deletions packages/admin-ui/src/pages/repository/components/Ipfs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export default function Ipfs() {
ipfsRepository: {
ipfsClientTarget: ipfsClientTarget,
ipfsGateway: ipfsGatewayTarget
},
deleteLocalIpfsClient: false
}
}),
{
message: `Setting IPFS mode ${ipfsClientTarget}...`,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ export interface Routes {
*/
ipfsClientTargetSet(kwargs: {
ipfsRepository: IpfsRepository;
deleteLocalIpfsClient?: boolean;
}): Promise<void>;

/**
Expand Down
68 changes: 68 additions & 0 deletions packages/common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,12 @@ export interface LocalIpResponse {
* ====
*/

export enum FileFormat {
JSON = "JSON",
YAML = "YAML",
TEXT = "TEXT",
}

export type DistributedFileSource = "ipfs" | "swarm";
export interface DistributedFile {
hash: string;
Expand All @@ -993,6 +999,68 @@ export enum IpfsClientTarget {
* ========
*/

// From https://nodejs.org/api/os.html#os_os_arch
export type NodeArch =
| "arm"
| "arm64"
| "ia32"
| "mips"
| "mipsel"
| "ppc"
| "ppc64"
| "s390"
| "s390x"
| "x32"
| "x64";

interface ManifestImage {
hash: string;
size: number;
path: string;
volumes?: string[];
ports?: string[];
environment?: string[];
/** FORBIDDEN FEATURE */
external_vol?: string[];
restart?: string;
privileged?: boolean;
cap_add?: string[];
cap_drop?: string[];
devices?: string[];
subnet?: string;
ipv4_address?: string;
network_mode?: string;
command?: string;
labels?: string[];
}

export interface ManifestWithImage extends Manifest {
image: ManifestImage;
}

export interface PackageRequest {
name: string;
ver: string;
req?: string;
}

export interface ReleaseSignature {
/** Version of the ReleaseSignature format */
version: 1;
/** Specs of the signed CIDs */
cid: {
version: 0 | 1;
base: "base58btc" | "base32" | "base64" | "base64url";
};
signature_protocol: ReleaseSignatureProtocol;
/**
* Signature of the serialized files in the directory
* ```
* 0x71b61418808a85c495f52bc9c781cbfeb0154c86aec8528c6cf7a83a26a0365f7ac4dea4eea7eea5e4ec14a10e01d8b8708d8c0c7c12420d152a272b69092b851b
* ```
*/
signature: string;
}
interface ReleaseWarnings {
/**
* If a core package does not come from the DAppNode Package APM registry
Expand Down
Loading

0 comments on commit 6dba2e3

Please sign in to comment.