mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
add pnpm to docker build to speed up builds
This commit is contained in:
parent
62db38520f
commit
2a6cb19405
@ -6,6 +6,7 @@ node_modules
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
**/node_modules
|
||||
|
||||
.idea
|
||||
# testing
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -26,32 +27,23 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
@ -59,30 +51,13 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
# Install CommonUI
|
||||
|
||||
FROM base AS commonui
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
RUN pnpm install --force
|
||||
COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=commonui /usr/src/CommonUI .
|
||||
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
@ -91,7 +66,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Accounts/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3003: accounts
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -26,31 +27,22 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
@ -58,29 +50,12 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
# Install CommonUI
|
||||
|
||||
FROM base AS commonui
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
RUN pnpm install --force
|
||||
COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=commonui /usr/src/CommonUI .
|
||||
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
@ -89,7 +64,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./AdminDashboard/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3158: AdminDashboard
|
||||
|
@ -1,10 +1,11 @@
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -22,46 +23,28 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
|
||||
ENV PRODUCTION=true
|
||||
@ -71,7 +54,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./ApiReference/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
|
||||
# Expose ports.
|
||||
|
@ -257,4 +257,20 @@ export default class AnalyticsDataModel {
|
||||
public set id(v: ObjectID | undefined) {
|
||||
this.setColumnValue('_id', v);
|
||||
}
|
||||
|
||||
public get createdAt(): Date | undefined {
|
||||
return this.getColumnValue('createdAt') as Date | undefined;
|
||||
}
|
||||
|
||||
public set createdAt(v: Date | undefined) {
|
||||
this.setColumnValue('createdAt', v);
|
||||
}
|
||||
|
||||
public get updatedAt(): Date | undefined {
|
||||
return this.getColumnValue('updatedAt') as Date | undefined;
|
||||
}
|
||||
|
||||
public set updatedAt(v: Date | undefined) {
|
||||
this.setColumnValue('updatedAt', v);
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ import DeleteBy from '../Types/AnalyticsDatabase/DeleteBy';
|
||||
import UpdateBy from '../Types/AnalyticsDatabase/UpdateBy';
|
||||
import FindBy from '../Types/AnalyticsDatabase/FindBy';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import SortOrder from 'Common/Types/BaseDatabase/SortOrder';
|
||||
import Query from '../Types/AnalyticsDatabase/Query';
|
||||
import Select from '../Types/AnalyticsDatabase/Select';
|
||||
|
||||
export default class AnalyticsDatabaseService<
|
||||
TBaseModel extends AnalyticsBaseModel
|
||||
@ -67,7 +70,7 @@ export default class AnalyticsDatabaseService<
|
||||
withDeleted?: boolean | undefined
|
||||
): Promise<Array<TBaseModel>> {
|
||||
try {
|
||||
let automaticallyAddedCreatedAtInSelect: boolean = false;
|
||||
|
||||
|
||||
if (!findBy.sort || Object.keys(findBy.sort).length === 0) {
|
||||
findBy.sort = {
|
||||
@ -78,10 +81,6 @@ export default class AnalyticsDatabaseService<
|
||||
findBy.select = {} as any;
|
||||
}
|
||||
|
||||
if (!(findBy.select as any)['createdAt']) {
|
||||
(findBy.select as any)['createdAt'] = true;
|
||||
automaticallyAddedCreatedAtInSelect = true;
|
||||
}
|
||||
}
|
||||
|
||||
const onFind: OnFind<TBaseModel> = findBy.props.ignoreHooks
|
||||
@ -104,7 +103,6 @@ export default class AnalyticsDatabaseService<
|
||||
const result: {
|
||||
query: Query<TBaseModel>;
|
||||
select: Select<TBaseModel> | null;
|
||||
relationSelect: RelationSelect<TBaseModel> | null;
|
||||
} = await ModelPermission.checkReadPermission(
|
||||
this.modelType,
|
||||
onBeforeFind.query,
|
||||
@ -123,7 +121,7 @@ export default class AnalyticsDatabaseService<
|
||||
onBeforeFind.limit = new PositiveNumber(onBeforeFind.limit);
|
||||
}
|
||||
|
||||
const items: Array<TBaseModel> = await this.getRepository().find({
|
||||
let items: Array<TBaseModel> = await this.getRepository().find({
|
||||
skip: onBeforeFind.skip.toNumber(),
|
||||
take: onBeforeFind.limit.toNumber(),
|
||||
where: onBeforeFind.query as any,
|
||||
@ -133,39 +131,40 @@ export default class AnalyticsDatabaseService<
|
||||
withDeleted: withDeleted || false,
|
||||
});
|
||||
|
||||
let decryptedItems: Array<TBaseModel> = [];
|
||||
|
||||
for (const item of items) {
|
||||
decryptedItems.push(this.decrypt(item));
|
||||
}
|
||||
|
||||
decryptedItems = this.sanitizeFindByItems(
|
||||
decryptedItems,
|
||||
items = this.sanitizeFindByItems(
|
||||
items,
|
||||
onBeforeFind
|
||||
);
|
||||
|
||||
for (const item of decryptedItems) {
|
||||
if (automaticallyAddedCreatedAtInSelect) {
|
||||
delete (item as any).createdAt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!findBy.props.ignoreHooks) {
|
||||
decryptedItems = await (
|
||||
items = await (
|
||||
await this.onFindSuccess(
|
||||
{ findBy, carryForward },
|
||||
decryptedItems
|
||||
items
|
||||
)
|
||||
).carryForward;
|
||||
}
|
||||
|
||||
return decryptedItems;
|
||||
return items;
|
||||
} catch (error) {
|
||||
await this.onFindError(error as Exception);
|
||||
throw this.getException(error as Exception);
|
||||
}
|
||||
}
|
||||
|
||||
private sanitizeFindByItems(
|
||||
items: Array<TBaseModel>,
|
||||
findBy: FindBy<TBaseModel>
|
||||
): Array<TBaseModel> {
|
||||
// if there's no select then there's nothing to do.
|
||||
if (!findBy.select) {
|
||||
return items;
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
public toTableCreateStatement(): string {
|
||||
if (!this.database) {
|
||||
|
@ -1,7 +1,9 @@
|
||||
import AnalyticsBaseModel from 'Common/AnalyticsModels/BaseModel';
|
||||
import DatabaseCommonInteractionProps from 'Common/Types/BaseDatabase/DatabaseCommonInteractionProps';
|
||||
import BaseModel from 'Common/AnalyticsModels/BaseModel';
|
||||
import PositiveNumber from 'Common/Types/PositiveNumber';
|
||||
import FindOneBy from './FindOneBy';
|
||||
|
||||
export default interface FindBy<TBaseModel extends AnalyticsBaseModel> {
|
||||
data: TBaseModel;
|
||||
props: DatabaseCommonInteractionProps;
|
||||
export default interface FindBy<TBaseModel extends BaseModel>
|
||||
extends FindOneBy<TBaseModel> {
|
||||
limit: PositiveNumber | number;
|
||||
skip: PositiveNumber | number;
|
||||
}
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -26,31 +27,22 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
@ -58,29 +50,12 @@ COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
# Install CommonUI
|
||||
|
||||
FROM base AS commonui
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
RUN pnpm install --force
|
||||
COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=commonui /usr/src/CommonUI .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
@ -88,7 +63,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Dashboard/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3009: Dashboard
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,55 +31,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./DashboardAPI/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3002: OneUptime-backend
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
|
||||
ARG GIT_SHA
|
||||
@ -31,45 +32,27 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
@ -77,7 +60,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./File/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
|
||||
# Expose ports.
|
||||
|
@ -4,6 +4,7 @@ RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm co
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -23,44 +24,26 @@ RUN apk add bash && apk add curl
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
@ -69,7 +52,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Home/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 1444: OneUptime Home
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,55 +31,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Identity/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3087: OneUptime-backend
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,55 +31,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Integration/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
|
||||
# Expose ports.
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -26,48 +27,26 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
|
||||
@ -75,7 +54,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Licensing/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3004: OneUptime-licensing
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,54 +31,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN ls
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./LinkShortener/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
|
||||
# Expose ports.
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -26,48 +27,26 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV CHROME_PATH=/usr/bin/chromium
|
||||
|
||||
@ -76,7 +55,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Notification/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
|
||||
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -33,55 +34,33 @@ RUN apk add iputils
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Probe/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3087: OneUptime-backend
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,55 +31,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./ProbeAPI/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3400: OneUptime-probe-api
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -17,45 +18,27 @@ ENV GIT_SHA=${GIT_SHA}
|
||||
ENV APP_VERSION=${APP_VERSION}
|
||||
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
@ -64,7 +47,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Realtime/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
EXPOSE 3300
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -23,64 +24,38 @@ RUN apk add bash && apk add curl
|
||||
#Use bash shell by default
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN npm install http-server -g
|
||||
RUN pnpm install http-server -g
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
|
||||
FROM base AS commonui
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
RUN pnpm install --force
|
||||
COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY --from=commonui /usr/src/CommonUI .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
@ -88,7 +63,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./StatusPage/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3105: StatusPage
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,55 +31,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./TestServer/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3800: OneUptime-test-server-api
|
||||
|
@ -7,6 +7,7 @@ RUN apk add bash && apk add curl
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -33,55 +34,33 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Workers/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3452: OneUptime-worker
|
||||
|
@ -3,12 +3,13 @@
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:current-alpine AS base
|
||||
FROM node:current-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
RUN npm config set fetch-retry-maxtimeout 6000000
|
||||
RUN npm config set fetch-retry-mintimeout 1000000
|
||||
RUN npm install -g pnpm
|
||||
|
||||
ARG GIT_SHA
|
||||
ARG APP_VERSION
|
||||
@ -30,54 +31,32 @@ SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
|
||||
FROM base AS common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
|
||||
FROM base AS model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
|
||||
FROM base AS commonserver
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
# Install app
|
||||
FROM base AS app
|
||||
|
||||
WORKDIR /usr/src/Common
|
||||
COPY --from=common /usr/src/Common .
|
||||
|
||||
WORKDIR /usr/src/Model
|
||||
COPY --from=model /usr/src/Model .
|
||||
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY --from=commonserver /usr/src/CommonServer .
|
||||
|
||||
ENV PRODUCTION=true
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Workflow/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
RUN pnpm install
|
||||
|
||||
|
||||
# Expose ports.
|
||||
|
Loading…
Reference in New Issue
Block a user