fix: restart containers on-failure instead of always
This commit is contained in:
@@ -4,7 +4,7 @@ import fs from 'fs/promises';
|
|||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
|
|
||||||
import { copyBaseConfigurationFiles, makeLabelForStandaloneApplication, saveBuildLog, setDefaultConfiguration } from '../lib/buildPacks/common';
|
import { copyBaseConfigurationFiles, makeLabelForStandaloneApplication, saveBuildLog, setDefaultConfiguration } from '../lib/buildPacks/common';
|
||||||
import { createDirectories, decrypt, executeDockerCmd, getDomain, prisma } from '../lib/common';
|
import { createDirectories, decrypt, defaultComposeConfiguration, executeDockerCmd, getDomain, prisma } from '../lib/common';
|
||||||
import * as importers from '../lib/importers';
|
import * as importers from '../lib/importers';
|
||||||
import * as buildpacks from '../lib/buildPacks';
|
import * as buildpacks from '../lib/buildPacks';
|
||||||
|
|
||||||
@@ -306,23 +306,14 @@ import * as buildpacks from '../lib/buildPacks';
|
|||||||
container_name: imageId,
|
container_name: imageId,
|
||||||
volumes,
|
volumes,
|
||||||
env_file: envFound ? [`${workdir}/.env`] : [],
|
env_file: envFound ? [`${workdir}/.env`] : [],
|
||||||
networks: [destinationDocker.network],
|
|
||||||
labels,
|
labels,
|
||||||
depends_on: [],
|
depends_on: [],
|
||||||
restart: 'always',
|
|
||||||
expose: [port],
|
expose: [port],
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
// logging: {
|
// logging: {
|
||||||
// driver: 'fluentd',
|
// driver: 'fluentd',
|
||||||
// },
|
// },
|
||||||
deploy: {
|
...defaultComposeConfiguration(destinationDocker.network),
|
||||||
restart_policy: {
|
|
||||||
condition: 'on-failure',
|
|
||||||
delay: '5s',
|
|
||||||
max_attempts: 3,
|
|
||||||
window: '120s'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
|
@@ -1813,4 +1813,20 @@ export function persistentVolumes(id, persistentStorage, config) {
|
|||||||
...composeVolumes
|
...composeVolumes
|
||||||
) || {}
|
) || {}
|
||||||
return { volumes, volumeMounts }
|
return { volumes, volumeMounts }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export function defaultComposeConfiguration(network: string): any {
|
||||||
|
return {
|
||||||
|
networks: [network],
|
||||||
|
restart: 'on-failure',
|
||||||
|
deploy: {
|
||||||
|
restart_policy: {
|
||||||
|
condition: 'on-failure',
|
||||||
|
delay: '5s',
|
||||||
|
max_attempts: 10,
|
||||||
|
window: '120s'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@@ -18,18 +18,3 @@ export async function defaultServiceConfigurations({ id, teamId }) {
|
|||||||
}
|
}
|
||||||
return { ...service, network, port, workdir, image, secrets }
|
return { ...service, network, port, workdir, image, secrets }
|
||||||
}
|
}
|
||||||
|
|
||||||
export function defaultServiceComposeConfiguration(network: string): any {
|
|
||||||
return {
|
|
||||||
networks: [network],
|
|
||||||
restart: 'always',
|
|
||||||
deploy: {
|
|
||||||
restart_policy: {
|
|
||||||
condition: 'on-failure',
|
|
||||||
delay: '10s',
|
|
||||||
max_attempts: 10,
|
|
||||||
window: '120s'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -2,14 +2,14 @@ import type { FastifyReply, FastifyRequest } from 'fastify';
|
|||||||
import fs from 'fs/promises';
|
import fs from 'fs/promises';
|
||||||
import yaml from 'js-yaml';
|
import yaml from 'js-yaml';
|
||||||
import bcrypt from 'bcryptjs';
|
import bcrypt from 'bcryptjs';
|
||||||
import { prisma, uniqueName, asyncExecShell, getServiceImage, configureServiceType, getServiceFromDB, getContainerUsage, removeService, isDomainConfigured, saveUpdateableFields, fixType, decrypt, encrypt, getServiceMainPort, createDirectories, ComposeFile, makeLabelForServices, getFreePublicPort, getDomain, errorHandler, generatePassword, isDev, stopTcpHttpProxy, supportedServiceTypesAndVersions, executeDockerCmd, listSettings, getFreeExposedPort, checkDomainsIsValidInDNS, persistentVolumes, asyncSleep, isARM } from '../../../../lib/common';
|
import { prisma, uniqueName, asyncExecShell, getServiceImage, configureServiceType, getServiceFromDB, getContainerUsage, removeService, isDomainConfigured, saveUpdateableFields, fixType, decrypt, encrypt, getServiceMainPort, createDirectories, ComposeFile, makeLabelForServices, getFreePublicPort, getDomain, errorHandler, generatePassword, isDev, stopTcpHttpProxy, supportedServiceTypesAndVersions, executeDockerCmd, listSettings, getFreeExposedPort, checkDomainsIsValidInDNS, persistentVolumes, asyncSleep, isARM, defaultComposeConfiguration } from '../../../../lib/common';
|
||||||
import { day } from '../../../../lib/dayjs';
|
import { day } from '../../../../lib/dayjs';
|
||||||
import { checkContainer, isContainerExited, removeContainer } from '../../../../lib/docker';
|
import { checkContainer, isContainerExited, removeContainer } from '../../../../lib/docker';
|
||||||
import cuid from 'cuid';
|
import cuid from 'cuid';
|
||||||
|
|
||||||
import type { OnlyId } from '../../../../types';
|
import type { OnlyId } from '../../../../types';
|
||||||
import type { ActivateWordpressFtp, CheckService, CheckServiceDomain, DeleteServiceSecret, DeleteServiceStorage, GetServiceLogs, SaveService, SaveServiceDestination, SaveServiceSecret, SaveServiceSettings, SaveServiceStorage, SaveServiceType, SaveServiceVersion, ServiceStartStop, SetWordpressSettings } from './types';
|
import type { ActivateWordpressFtp, CheckService, CheckServiceDomain, DeleteServiceSecret, DeleteServiceStorage, GetServiceLogs, SaveService, SaveServiceDestination, SaveServiceSecret, SaveServiceSettings, SaveServiceStorage, SaveServiceType, SaveServiceVersion, ServiceStartStop, SetWordpressSettings } from './types';
|
||||||
import { defaultServiceComposeConfiguration, defaultServiceConfigurations } from '../../../../lib/services';
|
import { defaultServiceConfigurations } from '../../../../lib/services';
|
||||||
|
|
||||||
// async function startServiceNew(request: FastifyRequest<OnlyId>) {
|
// async function startServiceNew(request: FastifyRequest<OnlyId>) {
|
||||||
// try {
|
// try {
|
||||||
@@ -806,21 +806,21 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`;
|
|||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
depends_on: [`${id}-postgresql`, `${id}-clickhouse`],
|
depends_on: [`${id}-postgresql`, `${id}-clickhouse`],
|
||||||
labels: makeLabelForServices('plausibleAnalytics'),
|
labels: makeLabelForServices('plausibleAnalytics'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-postgresql`]: {
|
[`${id}-postgresql`]: {
|
||||||
container_name: `${id}-postgresql`,
|
container_name: `${id}-postgresql`,
|
||||||
image: config.postgresql.image,
|
image: config.postgresql.image,
|
||||||
environment: config.postgresql.environmentVariables,
|
environment: config.postgresql.environmentVariables,
|
||||||
volumes: [config.postgresql.volume],
|
volumes: [config.postgresql.volume],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-clickhouse`]: {
|
[`${id}-clickhouse`]: {
|
||||||
build: workdir,
|
build: workdir,
|
||||||
container_name: `${id}-clickhouse`,
|
container_name: `${id}-clickhouse`,
|
||||||
environment: config.clickhouse.environmentVariables,
|
environment: config.clickhouse.environmentVariables,
|
||||||
volumes: [config.clickhouse.volume],
|
volumes: [config.clickhouse.volume],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -881,7 +881,7 @@ async function startNocodbService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
environment: config.environmentVariables,
|
environment: config.environmentVariables,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('nocodb'),
|
labels: makeLabelForServices('nocodb'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -953,7 +953,7 @@ async function startMinioService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
volumes,
|
volumes,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('minio'),
|
labels: makeLabelForServices('minio'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1019,7 +1019,7 @@ async function startVscodeService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
volumes,
|
volumes,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('vscodeServer'),
|
labels: makeLabelForServices('vscodeServer'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1126,7 +1126,7 @@ async function startWordpressService(request: FastifyRequest<ServiceStartStop>)
|
|||||||
volumes,
|
volumes,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('wordpress'),
|
labels: makeLabelForServices('wordpress'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1143,7 +1143,7 @@ async function startWordpressService(request: FastifyRequest<ServiceStartStop>)
|
|||||||
image: config.mysql.image,
|
image: config.mysql.image,
|
||||||
volumes: [config.mysql.volume],
|
volumes: [config.mysql.volume],
|
||||||
environment: config.mysql.environmentVariables,
|
environment: config.mysql.environmentVariables,
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
};
|
};
|
||||||
|
|
||||||
composeFile.volumes[config.mysql.volume.split(':')[0]] = {
|
composeFile.volumes[config.mysql.volume.split(':')[0]] = {
|
||||||
@@ -1196,7 +1196,7 @@ async function startVaultwardenService(request: FastifyRequest<ServiceStartStop>
|
|||||||
volumes,
|
volumes,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('vaultWarden'),
|
labels: makeLabelForServices('vaultWarden'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1252,7 +1252,7 @@ async function startLanguageToolService(request: FastifyRequest<ServiceStartStop
|
|||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
volumes,
|
volumes,
|
||||||
labels: makeLabelForServices('languagetool'),
|
labels: makeLabelForServices('languagetool'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1309,7 +1309,7 @@ async function startN8nService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
environment: config.environmentVariables,
|
environment: config.environmentVariables,
|
||||||
labels: makeLabelForServices('n8n'),
|
labels: makeLabelForServices('n8n'),
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1364,7 +1364,7 @@ async function startUptimekumaService(request: FastifyRequest<ServiceStartStop>)
|
|||||||
environment: config.environmentVariables,
|
environment: config.environmentVariables,
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('uptimekuma'),
|
labels: makeLabelForServices('uptimekuma'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1463,14 +1463,14 @@ async function startGhostService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('ghost'),
|
labels: makeLabelForServices('ghost'),
|
||||||
depends_on: [`${id}-mariadb`],
|
depends_on: [`${id}-mariadb`],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-mariadb`]: {
|
[`${id}-mariadb`]: {
|
||||||
container_name: `${id}-mariadb`,
|
container_name: `${id}-mariadb`,
|
||||||
image: config.mariadb.image,
|
image: config.mariadb.image,
|
||||||
volumes: [config.mariadb.volume],
|
volumes: [config.mariadb.volume],
|
||||||
environment: config.mariadb.environmentVariables,
|
environment: config.mariadb.environmentVariables,
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1536,7 +1536,7 @@ async function startMeilisearchService(request: FastifyRequest<ServiceStartStop>
|
|||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
volumes,
|
volumes,
|
||||||
labels: makeLabelForServices('meilisearch'),
|
labels: makeLabelForServices('meilisearch'),
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1702,14 +1702,14 @@ async function startUmamiService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
labels: makeLabelForServices('umami'),
|
labels: makeLabelForServices('umami'),
|
||||||
depends_on: [`${id}-postgresql`],
|
depends_on: [`${id}-postgresql`],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-postgresql`]: {
|
[`${id}-postgresql`]: {
|
||||||
build: workdir,
|
build: workdir,
|
||||||
container_name: `${id}-postgresql`,
|
container_name: `${id}-postgresql`,
|
||||||
environment: config.postgresql.environmentVariables,
|
environment: config.postgresql.environmentVariables,
|
||||||
volumes: [config.postgresql.volume],
|
volumes: [config.postgresql.volume],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1789,14 +1789,14 @@ async function startHasuraService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
labels: makeLabelForServices('hasura'),
|
labels: makeLabelForServices('hasura'),
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
depends_on: [`${id}-postgresql`],
|
depends_on: [`${id}-postgresql`],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-postgresql`]: {
|
[`${id}-postgresql`]: {
|
||||||
image: config.postgresql.image,
|
image: config.postgresql.image,
|
||||||
container_name: `${id}-postgresql`,
|
container_name: `${id}-postgresql`,
|
||||||
environment: config.postgresql.environmentVariables,
|
environment: config.postgresql.environmentVariables,
|
||||||
volumes: [config.postgresql.volume],
|
volumes: [config.postgresql.volume],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1902,14 +1902,14 @@ async function startFiderService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
labels: makeLabelForServices('fider'),
|
labels: makeLabelForServices('fider'),
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
depends_on: [`${id}-postgresql`],
|
depends_on: [`${id}-postgresql`],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-postgresql`]: {
|
[`${id}-postgresql`]: {
|
||||||
image: config.postgresql.image,
|
image: config.postgresql.image,
|
||||||
container_name: `${id}-postgresql`,
|
container_name: `${id}-postgresql`,
|
||||||
environment: config.postgresql.environmentVariables,
|
environment: config.postgresql.environmentVariables,
|
||||||
volumes: [config.postgresql.volume],
|
volumes: [config.postgresql.volume],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
networks: {
|
networks: {
|
||||||
@@ -1995,7 +1995,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"_APP_STATSD_PORT=8125",
|
"_APP_STATSD_PORT=8125",
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-realtime`]: {
|
[`${id}-realtime`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2018,7 +2018,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_DB_PASS=${mariadbPassword}`,
|
`_APP_DB_PASS=${mariadbPassword}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-audits`]: {
|
[`${id}-worker-audits`]: {
|
||||||
|
|
||||||
@@ -2042,7 +2042,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_DB_PASS=${mariadbPassword}`,
|
`_APP_DB_PASS=${mariadbPassword}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-webhooks`]: {
|
[`${id}-worker-webhooks`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2060,7 +2060,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"_APP_REDIS_PORT=6379",
|
"_APP_REDIS_PORT=6379",
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-deletes`]: {
|
[`${id}-worker-deletes`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2093,7 +2093,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_EXECUTOR_HOST=http://${id}-executor/v1`,
|
`_APP_EXECUTOR_HOST=http://${id}-executor/v1`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-databases`]: {
|
[`${id}-worker-databases`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2116,7 +2116,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_DB_PASS=${mariadbPassword}`,
|
`_APP_DB_PASS=${mariadbPassword}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-builds`]: {
|
[`${id}-worker-builds`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2141,7 +2141,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_DB_PASS=${mariadbPassword}`,
|
`_APP_DB_PASS=${mariadbPassword}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-certificates`]: {
|
[`${id}-worker-certificates`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2170,7 +2170,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_DB_PASS=${mariadbPassword}`,
|
`_APP_DB_PASS=${mariadbPassword}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-functions`]: {
|
[`${id}-worker-functions`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2196,7 +2196,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_EXECUTOR_HOST=http://${id}-executor/v1`,
|
`_APP_EXECUTOR_HOST=http://${id}-executor/v1`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-executor`]: {
|
[`${id}-executor`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2220,7 +2220,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_EXECUTOR_SECRET=${executorSecret}`,
|
`_APP_EXECUTOR_SECRET=${executorSecret}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-mails`]: {
|
[`${id}-worker-mails`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2237,7 +2237,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"_APP_REDIS_PORT=6379",
|
"_APP_REDIS_PORT=6379",
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-worker-messaging`]: {
|
[`${id}-worker-messaging`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2253,7 +2253,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"_APP_REDIS_PORT=6379",
|
"_APP_REDIS_PORT=6379",
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-maintenance`]: {
|
[`${id}-maintenance`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2277,7 +2277,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_DB_PASS=${mariadbPassword}`,
|
`_APP_DB_PASS=${mariadbPassword}`,
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-schedule`]: {
|
[`${id}-schedule`]: {
|
||||||
image: `${image}:${version}`,
|
image: `${image}:${version}`,
|
||||||
@@ -2293,7 +2293,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"_APP_REDIS_PORT=6379",
|
"_APP_REDIS_PORT=6379",
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-mariadb`]: {
|
[`${id}-mariadb`]: {
|
||||||
"image": "mariadb:10.7",
|
"image": "mariadb:10.7",
|
||||||
@@ -2310,7 +2310,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`MYSQL_DATABASE=${mariadbDatabase}`
|
`MYSQL_DATABASE=${mariadbDatabase}`
|
||||||
],
|
],
|
||||||
"command": "mysqld --innodb-flush-method=fsync",
|
"command": "mysqld --innodb-flush-method=fsync",
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
[`${id}-redis`]: {
|
[`${id}-redis`]: {
|
||||||
"image": "redis:6.2-alpine",
|
"image": "redis:6.2-alpine",
|
||||||
@@ -2319,7 +2319,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"volumes": [
|
"volumes": [
|
||||||
`${id}-redis:/data:rw`
|
`${id}-redis:/data:rw`
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -2348,7 +2348,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"_APP_REDIS_PORT=6379",
|
"_APP_REDIS_PORT=6379",
|
||||||
...secrets
|
...secrets
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
dockerCompose[`${id}-influxdb`] = {
|
dockerCompose[`${id}-influxdb`] = {
|
||||||
"image": "appwrite/influxdb:1.5.0",
|
"image": "appwrite/influxdb:1.5.0",
|
||||||
@@ -2356,7 +2356,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
"volumes": [
|
"volumes": [
|
||||||
`${id}-influxdb:/var/lib/influxdb:rw`
|
`${id}-influxdb:/var/lib/influxdb:rw`
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
dockerCompose[`${id}-telegraf`] = {
|
dockerCompose[`${id}-telegraf`] = {
|
||||||
"image": "appwrite/telegraf:1.4.0",
|
"image": "appwrite/telegraf:1.4.0",
|
||||||
@@ -2365,7 +2365,7 @@ async function startAppWriteService(request: FastifyRequest<ServiceStartStop>) {
|
|||||||
`_APP_INFLUXDB_HOST=${id}-influxdb`,
|
`_APP_INFLUXDB_HOST=${id}-influxdb`,
|
||||||
"_APP_INFLUXDB_PORT=8086",
|
"_APP_INFLUXDB_PORT=8086",
|
||||||
],
|
],
|
||||||
...defaultServiceComposeConfiguration(network),
|
...defaultComposeConfiguration(network),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user