Compare commits
5 Commits
feat/docke
...
workflows
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cb5c617c8 | ||
|
|
c9e03003c0 | ||
|
|
677fbca7b5 | ||
|
|
f1577bc120 | ||
|
|
b86e1c389e |
10
docker/.gitignore
vendored
10
docker/.gitignore
vendored
@@ -1,9 +1 @@
|
|||||||
.DS_Store
|
.env
|
||||||
node_modules
|
|
||||||
/build
|
|
||||||
/.svelte-kit
|
|
||||||
/dist
|
|
||||||
/package
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
!.env.example
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
engine-strict=true
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
22.11.0
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
/build
|
|
||||||
/package
|
|
||||||
/coverage
|
|
||||||
.env
|
|
||||||
.env.*
|
|
||||||
!.env.example
|
|
||||||
*.md
|
|
||||||
|
|
||||||
# Ignore files for PNPM, NPM and YARN
|
|
||||||
pnpm-lock.yaml
|
|
||||||
package-lock.json
|
|
||||||
yarn.lock
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"jsonRecursiveSort": true,
|
|
||||||
"organizeImportsSkipDestructiveCodeActions": true,
|
|
||||||
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-sort-json"],
|
|
||||||
"printWidth": 120,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "all"
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
import { FlatCompat } from '@eslint/eslintrc';
|
|
||||||
import js from '@eslint/js';
|
|
||||||
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
||||||
import tsParser from '@typescript-eslint/parser';
|
|
||||||
import globals from 'globals';
|
|
||||||
import path from 'node:path';
|
|
||||||
import { fileURLToPath } from 'node:url';
|
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
|
||||||
const __dirname = path.dirname(__filename);
|
|
||||||
const compat = new FlatCompat({
|
|
||||||
baseDirectory: __dirname,
|
|
||||||
recommendedConfig: js.configs.recommended,
|
|
||||||
allConfig: js.configs.all,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
ignores: [
|
|
||||||
'**/.DS_Store',
|
|
||||||
'**/node_modules',
|
|
||||||
'dist',
|
|
||||||
'lib/docker-compose/types.ts',
|
|
||||||
'build',
|
|
||||||
'package',
|
|
||||||
'**/.env',
|
|
||||||
'**/.env.*',
|
|
||||||
'!**/.env.example',
|
|
||||||
'**/pnpm-lock.yaml',
|
|
||||||
'**/package-lock.json',
|
|
||||||
'**/yarn.lock',
|
|
||||||
'eslint.config.mjs',
|
|
||||||
'vite.config.js',
|
|
||||||
'coverage',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:unicorn/recommended'),
|
|
||||||
{
|
|
||||||
ignores: ['src/**'],
|
|
||||||
plugins: {
|
|
||||||
'@typescript-eslint': typescriptEslint,
|
|
||||||
},
|
|
||||||
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.browser,
|
|
||||||
...globals.node,
|
|
||||||
NodeJS: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
parser: tsParser,
|
|
||||||
ecmaVersion: 2022,
|
|
||||||
sourceType: 'module',
|
|
||||||
|
|
||||||
parserOptions: {
|
|
||||||
tsconfigRootDir: __dirname,
|
|
||||||
project: ['./tsconfig.json'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
rules: {
|
|
||||||
'@typescript-eslint/no-unused-vars': [
|
|
||||||
'warn',
|
|
||||||
{
|
|
||||||
argsIgnorePattern: '^_$',
|
|
||||||
varsIgnorePattern: '^_$',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
curly: 2,
|
|
||||||
'unicorn/no-useless-undefined': 'off',
|
|
||||||
'unicorn/prefer-spread': 'off',
|
|
||||||
'unicorn/no-null': 'off',
|
|
||||||
'unicorn/prevent-abbreviations': 'off',
|
|
||||||
'unicorn/no-nested-ternary': 'off',
|
|
||||||
'unicorn/consistent-function-scoping': 'off',
|
|
||||||
'unicorn/prefer-top-level-await': 'off',
|
|
||||||
'unicorn/import-style': 'off',
|
|
||||||
'@typescript-eslint/await-thenable': 'error',
|
|
||||||
'@typescript-eslint/no-floating-promises': 'error',
|
|
||||||
'@typescript-eslint/no-misused-promises': 'error',
|
|
||||||
'@typescript-eslint/require-await': 'error',
|
|
||||||
'object-shorthand': ['error', 'always'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
import { dump as dumpYaml } from 'js-yaml';
|
|
||||||
import { ComposeBuilder, ServiceBuilder } from 'lib/docker-compose/builder';
|
|
||||||
import { ContainerName, GeneratorOptions, ServiceName } from 'lib/types';
|
|
||||||
import { asQueryParams, getImmichEnvironment, getImmichVolumes, isExternalPostgres, isIoRedis } from 'lib/utils';
|
|
||||||
|
|
||||||
const RELEASE_VERSION = 'v1.122.0';
|
|
||||||
const postgresHealthCheck = [
|
|
||||||
'pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;',
|
|
||||||
`Chksum="$$(psql --dbname="$\${POSTGRES_DB}" --username="$\${POSTGRES_USER}" --tuples-only --no-align`,
|
|
||||||
`--command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";`,
|
|
||||||
'echo "checksum failure count is $$Chksum";',
|
|
||||||
`[ "$$Chksum" = '0' ] || exit 1\n`,
|
|
||||||
].join(' ');
|
|
||||||
const postgresCommand = [
|
|
||||||
`postgres`,
|
|
||||||
`-c shared_preload_libraries=vectors.so`,
|
|
||||||
`-c 'search_path="$$user", public, vectors'`,
|
|
||||||
`-c logging_collector=on`,
|
|
||||||
`-c max_wal_size=2GB`,
|
|
||||||
`-c shared_buffers=512MB`,
|
|
||||||
`-c wal_compression=on`,
|
|
||||||
].join(' ');
|
|
||||||
|
|
||||||
const build = (options: GeneratorOptions) => {
|
|
||||||
const healthchecksEnabled = options.healthchecks ?? true;
|
|
||||||
const containerNames = options.containerNames ?? true;
|
|
||||||
|
|
||||||
const immichService = ServiceBuilder.create(ServiceName.ImmichServer)
|
|
||||||
.setImage(`ghcr.io/immich-app/immich-server:${RELEASE_VERSION}`)
|
|
||||||
.setContainerName(containerNames && ContainerName.ImmichServer)
|
|
||||||
.setRestartPolicy('always')
|
|
||||||
.setHealthcheck(healthchecksEnabled)
|
|
||||||
.setEnvironment(getImmichEnvironment(options))
|
|
||||||
.addExposedPort(2283)
|
|
||||||
.addVolumes(getImmichVolumes(options));
|
|
||||||
|
|
||||||
const machineLearningEnabled = options.machineLearning;
|
|
||||||
const modelCacheVolume = 'model-cache';
|
|
||||||
const machineLearningService =
|
|
||||||
machineLearningEnabled &&
|
|
||||||
ServiceBuilder.create(ServiceName.ImmichMachineLearning)
|
|
||||||
.setImage(`ghcr.io/immich-app/immich-machine-learning:${RELEASE_VERSION}-cuda`)
|
|
||||||
.setContainerName(containerNames && ContainerName.ImmichMachineLearning)
|
|
||||||
.setRestartPolicy('always')
|
|
||||||
.setHealthcheck(healthchecksEnabled)
|
|
||||||
.addVolume(`${modelCacheVolume}:/cache`);
|
|
||||||
|
|
||||||
const redisService = isIoRedis(options)
|
|
||||||
? false
|
|
||||||
: ServiceBuilder.create(ServiceName.Redis)
|
|
||||||
.setImage('docker.io/redis:6.2-alpine')
|
|
||||||
.setContainerName(containerNames && ContainerName.Redis)
|
|
||||||
.setRestartPolicy('always')
|
|
||||||
.setHealthcheck(healthchecksEnabled && 'redis-cli ping || exit 1');
|
|
||||||
|
|
||||||
const postgresService = isExternalPostgres(options)
|
|
||||||
? false
|
|
||||||
: ServiceBuilder.create(ServiceName.Postgres)
|
|
||||||
.setImage('docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0')
|
|
||||||
.setContainerName(containerNames && ContainerName.Postgres)
|
|
||||||
.setRestartPolicy('always')
|
|
||||||
.setEnvironment({
|
|
||||||
POSTGRES_PASSWORD: options.postgresPassword,
|
|
||||||
POSTGRES_USER: options.postgresUser,
|
|
||||||
POSTGRES_DB: options.postgresDatabase,
|
|
||||||
POSTGRES_INITDB_ARGS: '--data-checksums',
|
|
||||||
})
|
|
||||||
.setHealthcheck(healthchecksEnabled && postgresHealthCheck)
|
|
||||||
.setCommand(postgresCommand)
|
|
||||||
.addVolume(`${options.postgresDataLocation}:/var/lib/postgresql/data`);
|
|
||||||
|
|
||||||
const domain = 'https://get.immich.app';
|
|
||||||
const url = `${domain}/compose?${asQueryParams(options)}`;
|
|
||||||
|
|
||||||
return ComposeBuilder.create('immich')
|
|
||||||
.addComment(`This docker compose file was originally generated at https://get.immich.app/compose`)
|
|
||||||
.addComment(url)
|
|
||||||
.addComment(`${dumpYaml({ options }, { indent: 2 })}`)
|
|
||||||
.addService(immichService.addDependsOn(redisService).addDependsOn(postgresService))
|
|
||||||
.addService(machineLearningService)
|
|
||||||
.addService(redisService)
|
|
||||||
.addService(postgresService)
|
|
||||||
.addVolume(modelCacheVolume, machineLearningEnabled && {});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const buildSpec = (options: GeneratorOptions) => build(options).asSpec();
|
|
||||||
export const buildYaml = (options: GeneratorOptions) => build(options).asYaml();
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
import { dump as dumpYaml } from 'js-yaml';
|
|
||||||
import {
|
|
||||||
Command,
|
|
||||||
ComposeSpecification,
|
|
||||||
DefinitionsService,
|
|
||||||
DefinitionsVolume,
|
|
||||||
ListOfStrings,
|
|
||||||
} from 'lib/docker-compose/types';
|
|
||||||
|
|
||||||
type ServiceNameAccessor = { getName: () => string };
|
|
||||||
type ServiceBuildAccessor = { build: () => DefinitionsService };
|
|
||||||
|
|
||||||
const withNewLines = (yaml: string) =>
|
|
||||||
yaml.replaceAll(/(?<leading>[^:]\n)(?<key>[ ]{0,2}\S+:)$/gm, '$<leading>\n$<key>');
|
|
||||||
|
|
||||||
export class ComposeBuilder {
|
|
||||||
private spec: ComposeSpecification = {};
|
|
||||||
private comments: string[] = [];
|
|
||||||
|
|
||||||
private constructor(projectName?: string) {
|
|
||||||
if (projectName) {
|
|
||||||
this.setProjectName(projectName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static create(projectName?: string) {
|
|
||||||
return new ComposeBuilder(projectName);
|
|
||||||
}
|
|
||||||
|
|
||||||
setProjectName(name: string) {
|
|
||||||
this.spec.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addComment(comment: string) {
|
|
||||||
this.comments.push(comment + '\n');
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addService(spec: false | (ServiceNameAccessor & ServiceBuildAccessor)) {
|
|
||||||
if (!spec) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.spec.services) {
|
|
||||||
this.spec.services = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.spec.services[spec.getName()] = spec.build();
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addVolume(name: string, volume: false | DefinitionsVolume) {
|
|
||||||
if (volume === false) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.spec.volumes) {
|
|
||||||
this.spec.volumes = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.spec.volumes[name] = volume;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
asSpec() {
|
|
||||||
return this.spec;
|
|
||||||
}
|
|
||||||
|
|
||||||
asYaml() {
|
|
||||||
let prefix = '';
|
|
||||||
if (this.comments.length > 0) {
|
|
||||||
const comments =
|
|
||||||
this.comments
|
|
||||||
.flatMap((comment) => comment.split('\n'))
|
|
||||||
.join('\n')
|
|
||||||
.trim()
|
|
||||||
.split('\n')
|
|
||||||
.map((comment) => `# ${comment}`)
|
|
||||||
.join('\n') + '\n\n';
|
|
||||||
|
|
||||||
prefix += comments;
|
|
||||||
}
|
|
||||||
|
|
||||||
const spec = withNewLines(dumpYaml(this.spec, { indent: 2, lineWidth: 140 })).trim();
|
|
||||||
|
|
||||||
return prefix + spec;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ServiceBuilder {
|
|
||||||
private spec: DefinitionsService = {};
|
|
||||||
|
|
||||||
private constructor(private name: string) {}
|
|
||||||
|
|
||||||
static create(name: string) {
|
|
||||||
return new ServiceBuilder(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
getName() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
setImage(image: string) {
|
|
||||||
this.spec.image = image;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
setContainerName(name: false | string) {
|
|
||||||
if (name === false) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.spec.container_name = name;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addExposedPort(port: number | { internal: number; external: number }) {
|
|
||||||
if (typeof port === 'number') {
|
|
||||||
port = { internal: port, external: port };
|
|
||||||
}
|
|
||||||
|
|
||||||
const { internal, external } = port;
|
|
||||||
|
|
||||||
if (!this.spec.ports) {
|
|
||||||
this.spec.ports = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.spec.ports.push(`${external}:${internal}`);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addDependsOn(service: false | string | ServiceNameAccessor) {
|
|
||||||
if (service === false) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
let serviceName = service as string;
|
|
||||||
if ('getName' in (service as ServiceNameAccessor)) {
|
|
||||||
serviceName = (service as ServiceNameAccessor).getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.spec.depends_on) {
|
|
||||||
this.spec.depends_on = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
(this.spec.depends_on as ListOfStrings).push(serviceName);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
setRestartPolicy(restart: string) {
|
|
||||||
this.spec.restart = restart;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
setEnvironment(env: Record<string, string | number | undefined>) {
|
|
||||||
this.spec.environment = env;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
setHealthcheck(test: boolean | string) {
|
|
||||||
if (test === true) {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (test === false) {
|
|
||||||
this.spec.healthcheck = { disable: true };
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.spec.healthcheck = { test };
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
setCommand(command: Command) {
|
|
||||||
this.spec.command = command;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addVolume(volume: string) {
|
|
||||||
if (!this.spec.volumes) {
|
|
||||||
this.spec.volumes = [];
|
|
||||||
}
|
|
||||||
this.spec.volumes.push(volume);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
addVolumes(volumes: string[]) {
|
|
||||||
for (const volume of volumes) {
|
|
||||||
this.addVolume(volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
return this.spec;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,937 +0,0 @@
|
|||||||
export type DefinitionsInclude =
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
path?: StringOrList;
|
|
||||||
env_file?: StringOrList;
|
|
||||||
project_directory?: string;
|
|
||||||
};
|
|
||||||
export type StringOrList = string | ListOfStrings;
|
|
||||||
export type ListOfStrings = string[];
|
|
||||||
export type DefinitionsDevelopment = {
|
|
||||||
watch?: {
|
|
||||||
ignore?: string[];
|
|
||||||
path: string;
|
|
||||||
action: 'rebuild' | 'sync' | 'sync+restart';
|
|
||||||
target?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} & Development;
|
|
||||||
export type Development = {
|
|
||||||
watch?: {
|
|
||||||
ignore?: string[];
|
|
||||||
path: string;
|
|
||||||
action: 'rebuild' | 'sync' | 'sync+restart';
|
|
||||||
target?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} | null;
|
|
||||||
export type DefinitionsDeployment = {
|
|
||||||
mode?: string;
|
|
||||||
endpoint_mode?: string;
|
|
||||||
replicas?: number | string;
|
|
||||||
labels?: ListOrDict;
|
|
||||||
rollback_config?: {
|
|
||||||
parallelism?: number | string;
|
|
||||||
delay?: string;
|
|
||||||
failure_action?: string;
|
|
||||||
monitor?: string;
|
|
||||||
max_failure_ratio?: number | string;
|
|
||||||
order?: 'start-first' | 'stop-first';
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
update_config?: {
|
|
||||||
parallelism?: number | string;
|
|
||||||
delay?: string;
|
|
||||||
failure_action?: string;
|
|
||||||
monitor?: string;
|
|
||||||
max_failure_ratio?: number | string;
|
|
||||||
order?: 'start-first' | 'stop-first';
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
resources?: {
|
|
||||||
limits?: {
|
|
||||||
cpus?: number | string;
|
|
||||||
memory?: string;
|
|
||||||
pids?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
reservations?: {
|
|
||||||
cpus?: number | string;
|
|
||||||
memory?: string;
|
|
||||||
generic_resources?: DefinitionsGenericResources;
|
|
||||||
devices?: DefinitionsDevices;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
restart_policy?: {
|
|
||||||
condition?: string;
|
|
||||||
delay?: string;
|
|
||||||
max_attempts?: number | string;
|
|
||||||
window?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
placement?: {
|
|
||||||
constraints?: string[];
|
|
||||||
preferences?: {
|
|
||||||
spread?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
max_replicas_per_node?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} & Deployment;
|
|
||||||
export type ListOrDict =
|
|
||||||
| {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` ".+".
|
|
||||||
*/
|
|
||||||
[k: string]: undefined | string | number | boolean | null;
|
|
||||||
}
|
|
||||||
| string[];
|
|
||||||
export type DefinitionsGenericResources = {
|
|
||||||
discrete_resource_spec?: {
|
|
||||||
kind?: string;
|
|
||||||
value?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
export type DefinitionsDevices = {
|
|
||||||
capabilities: ListOfStrings;
|
|
||||||
count?: string | number;
|
|
||||||
device_ids?: ListOfStrings;
|
|
||||||
driver?: string;
|
|
||||||
options?: ListOrDict;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
export type Deployment = {
|
|
||||||
mode?: string;
|
|
||||||
endpoint_mode?: string;
|
|
||||||
replicas?: number | string;
|
|
||||||
labels?: ListOrDict;
|
|
||||||
rollback_config?: {
|
|
||||||
parallelism?: number | string;
|
|
||||||
delay?: string;
|
|
||||||
failure_action?: string;
|
|
||||||
monitor?: string;
|
|
||||||
max_failure_ratio?: number | string;
|
|
||||||
order?: 'start-first' | 'stop-first';
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
update_config?: {
|
|
||||||
parallelism?: number | string;
|
|
||||||
delay?: string;
|
|
||||||
failure_action?: string;
|
|
||||||
monitor?: string;
|
|
||||||
max_failure_ratio?: number | string;
|
|
||||||
order?: 'start-first' | 'stop-first';
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
resources?: {
|
|
||||||
limits?: {
|
|
||||||
cpus?: number | string;
|
|
||||||
memory?: string;
|
|
||||||
pids?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
reservations?: {
|
|
||||||
cpus?: number | string;
|
|
||||||
memory?: string;
|
|
||||||
generic_resources?: DefinitionsGenericResources;
|
|
||||||
devices?: DefinitionsDevices;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
restart_policy?: {
|
|
||||||
condition?: string;
|
|
||||||
delay?: string;
|
|
||||||
max_attempts?: number | string;
|
|
||||||
window?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
placement?: {
|
|
||||||
constraints?: string[];
|
|
||||||
preferences?: {
|
|
||||||
spread?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
max_replicas_per_node?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} | null;
|
|
||||||
export type ExtraHosts = {} | string[];
|
|
||||||
export type ServiceConfigOrSecret = (
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
source?: string;
|
|
||||||
target?: string;
|
|
||||||
uid?: string;
|
|
||||||
gid?: string;
|
|
||||||
mode?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
)[];
|
|
||||||
export type Command = null | string | string[];
|
|
||||||
export type EnvFile =
|
|
||||||
| string
|
|
||||||
| (
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
path: string;
|
|
||||||
format?: string;
|
|
||||||
required?: boolean | string;
|
|
||||||
}
|
|
||||||
)[];
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `PropertiesNetworks`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
export type DefinitionsNetwork = {
|
|
||||||
name?: string;
|
|
||||||
driver?: string;
|
|
||||||
driver_opts?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number;
|
|
||||||
};
|
|
||||||
ipam?: {
|
|
||||||
driver?: string;
|
|
||||||
config?: {
|
|
||||||
subnet?: string;
|
|
||||||
ip_range?: string;
|
|
||||||
gateway?: string;
|
|
||||||
aux_addresses?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
options?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
external?:
|
|
||||||
| boolean
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
internal?: boolean | string;
|
|
||||||
enable_ipv6?: boolean | string;
|
|
||||||
attachable?: boolean | string;
|
|
||||||
labels?: ListOrDict;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} & Network;
|
|
||||||
export type Network = {
|
|
||||||
name?: string;
|
|
||||||
driver?: string;
|
|
||||||
driver_opts?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number;
|
|
||||||
};
|
|
||||||
ipam?: {
|
|
||||||
driver?: string;
|
|
||||||
config?: {
|
|
||||||
subnet?: string;
|
|
||||||
ip_range?: string;
|
|
||||||
gateway?: string;
|
|
||||||
aux_addresses?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}[];
|
|
||||||
options?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
external?:
|
|
||||||
| boolean
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
internal?: boolean | string;
|
|
||||||
enable_ipv6?: boolean | string;
|
|
||||||
attachable?: boolean | string;
|
|
||||||
labels?: ListOrDict;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} | null;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `PropertiesVolumes`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
export type DefinitionsVolume = {
|
|
||||||
name?: string;
|
|
||||||
driver?: string;
|
|
||||||
driver_opts?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number;
|
|
||||||
};
|
|
||||||
external?:
|
|
||||||
| boolean
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
labels?: ListOrDict;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} & Volume;
|
|
||||||
export type Volume = {
|
|
||||||
name?: string;
|
|
||||||
driver?: string;
|
|
||||||
driver_opts?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number;
|
|
||||||
};
|
|
||||||
external?:
|
|
||||||
| boolean
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
labels?: ListOrDict;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} | null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Compose file is a YAML file defining a multi-containers based application.
|
|
||||||
*/
|
|
||||||
export interface ComposeSpecification {
|
|
||||||
/**
|
|
||||||
* declared for backward compatibility, ignored.
|
|
||||||
*/
|
|
||||||
version?: string;
|
|
||||||
/**
|
|
||||||
* define the Compose project name, until user defines one explicitly.
|
|
||||||
*/
|
|
||||||
name?: string;
|
|
||||||
/**
|
|
||||||
* compose sub-projects to be included.
|
|
||||||
*/
|
|
||||||
include?: DefinitionsInclude[];
|
|
||||||
services?: PropertiesServices;
|
|
||||||
networks?: PropertiesNetworks;
|
|
||||||
volumes?: PropertiesVolumes;
|
|
||||||
secrets?: PropertiesSecrets;
|
|
||||||
configs?: PropertiesConfigs;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `ComposeSpecification`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface PropertiesServices {
|
|
||||||
[k: string]: DefinitionsService;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `PropertiesServices`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
export interface DefinitionsService {
|
|
||||||
develop?: DefinitionsDevelopment;
|
|
||||||
deploy?: DefinitionsDeployment;
|
|
||||||
annotations?: ListOrDict;
|
|
||||||
attach?: boolean | string;
|
|
||||||
build?:
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
context?: string;
|
|
||||||
dockerfile?: string;
|
|
||||||
dockerfile_inline?: string;
|
|
||||||
entitlements?: string[];
|
|
||||||
args?: ListOrDict;
|
|
||||||
ssh?: ListOrDict;
|
|
||||||
labels?: ListOrDict;
|
|
||||||
cache_from?: string[];
|
|
||||||
cache_to?: string[];
|
|
||||||
no_cache?: boolean | string;
|
|
||||||
additional_contexts?: ListOrDict;
|
|
||||||
network?: string;
|
|
||||||
pull?: boolean | string;
|
|
||||||
target?: string;
|
|
||||||
shm_size?: number | string;
|
|
||||||
extra_hosts?: ExtraHosts;
|
|
||||||
isolation?: string;
|
|
||||||
privileged?: boolean | string;
|
|
||||||
secrets?: ServiceConfigOrSecret;
|
|
||||||
tags?: string[];
|
|
||||||
ulimits?: Ulimits;
|
|
||||||
platforms?: string[];
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
blkio_config?: {
|
|
||||||
device_read_bps?: BlkioLimit[];
|
|
||||||
device_read_iops?: BlkioLimit[];
|
|
||||||
device_write_bps?: BlkioLimit[];
|
|
||||||
device_write_iops?: BlkioLimit[];
|
|
||||||
weight?: number | string;
|
|
||||||
weight_device?: BlkioWeight[];
|
|
||||||
};
|
|
||||||
cap_add?: string[];
|
|
||||||
cap_drop?: string[];
|
|
||||||
cgroup?: 'host' | 'private';
|
|
||||||
cgroup_parent?: string;
|
|
||||||
command?: Command;
|
|
||||||
configs?: ServiceConfigOrSecret;
|
|
||||||
container_name?: string;
|
|
||||||
cpu_count?: string | number;
|
|
||||||
cpu_percent?: string | number;
|
|
||||||
cpu_shares?: number | string;
|
|
||||||
cpu_quota?: number | string;
|
|
||||||
cpu_period?: number | string;
|
|
||||||
cpu_rt_period?: number | string;
|
|
||||||
cpu_rt_runtime?: number | string;
|
|
||||||
cpus?: number | string;
|
|
||||||
cpuset?: string;
|
|
||||||
credential_spec?: {
|
|
||||||
config?: string;
|
|
||||||
file?: string;
|
|
||||||
registry?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
depends_on?:
|
|
||||||
| ListOfStrings
|
|
||||||
| {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
[k: string]: {
|
|
||||||
restart?: boolean | string;
|
|
||||||
required?: boolean;
|
|
||||||
condition: 'service_started' | 'service_healthy' | 'service_completed_successfully';
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
device_cgroup_rules?: ListOfStrings;
|
|
||||||
devices?: (
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
source: string;
|
|
||||||
target?: string;
|
|
||||||
permissions?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
)[];
|
|
||||||
dns?: StringOrList;
|
|
||||||
dns_opt?: string[];
|
|
||||||
dns_search?: StringOrList;
|
|
||||||
domainname?: string;
|
|
||||||
entrypoint?: Command;
|
|
||||||
env_file?: EnvFile;
|
|
||||||
environment?: ListOrDict;
|
|
||||||
expose?: (string | number)[];
|
|
||||||
extends?:
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
service: string;
|
|
||||||
file?: string;
|
|
||||||
};
|
|
||||||
external_links?: string[];
|
|
||||||
extra_hosts?: ExtraHosts;
|
|
||||||
group_add?: (string | number)[];
|
|
||||||
healthcheck?: DefinitionsHealthcheck;
|
|
||||||
hostname?: string;
|
|
||||||
image?: string;
|
|
||||||
init?: boolean | string;
|
|
||||||
ipc?: string;
|
|
||||||
isolation?: string;
|
|
||||||
labels?: ListOrDict;
|
|
||||||
links?: string[];
|
|
||||||
logging?: {
|
|
||||||
driver?: string;
|
|
||||||
options?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number | null;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
mac_address?: string;
|
|
||||||
mem_limit?: number | string;
|
|
||||||
mem_reservation?: string | number;
|
|
||||||
mem_swappiness?: number | string;
|
|
||||||
memswap_limit?: number | string;
|
|
||||||
network_mode?: string;
|
|
||||||
networks?:
|
|
||||||
| ListOfStrings
|
|
||||||
| {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
[k: string]: {
|
|
||||||
aliases?: ListOfStrings;
|
|
||||||
ipv4_address?: string;
|
|
||||||
ipv6_address?: string;
|
|
||||||
link_local_ips?: ListOfStrings;
|
|
||||||
mac_address?: string;
|
|
||||||
driver_opts?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number;
|
|
||||||
};
|
|
||||||
priority?: number;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
} | null;
|
|
||||||
};
|
|
||||||
oom_kill_disable?: boolean | string;
|
|
||||||
oom_score_adj?: string | number;
|
|
||||||
pid?: string | null;
|
|
||||||
pids_limit?: number | string;
|
|
||||||
platform?: string;
|
|
||||||
ports?: (
|
|
||||||
| number
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
mode?: string;
|
|
||||||
host_ip?: string;
|
|
||||||
target?: number | string;
|
|
||||||
published?: string | number;
|
|
||||||
protocol?: string;
|
|
||||||
app_protocol?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
)[];
|
|
||||||
post_start?: DefinitionsServiceHook[];
|
|
||||||
pre_stop?: DefinitionsServiceHook[];
|
|
||||||
privileged?: boolean | string;
|
|
||||||
profiles?: ListOfStrings;
|
|
||||||
pull_policy?: 'always' | 'never' | 'if_not_present' | 'build' | 'missing';
|
|
||||||
read_only?: boolean | string;
|
|
||||||
restart?: string;
|
|
||||||
runtime?: string;
|
|
||||||
scale?: number | string;
|
|
||||||
security_opt?: string[];
|
|
||||||
shm_size?: number | string;
|
|
||||||
secrets?: ServiceConfigOrSecret;
|
|
||||||
sysctls?: ListOrDict;
|
|
||||||
stdin_open?: boolean | string;
|
|
||||||
stop_grace_period?: string;
|
|
||||||
stop_signal?: string;
|
|
||||||
storage_opt?: {
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
tmpfs?: StringOrList;
|
|
||||||
tty?: boolean | string;
|
|
||||||
ulimits?: Ulimits;
|
|
||||||
user?: string;
|
|
||||||
uts?: string;
|
|
||||||
userns_mode?: string;
|
|
||||||
volumes?: (
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
type: string;
|
|
||||||
source?: string;
|
|
||||||
target?: string;
|
|
||||||
read_only?: boolean | string;
|
|
||||||
consistency?: string;
|
|
||||||
bind?: {
|
|
||||||
propagation?: string;
|
|
||||||
create_host_path?: boolean | string;
|
|
||||||
selinux?: 'z' | 'Z';
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
volume?: {
|
|
||||||
nocopy?: boolean | string;
|
|
||||||
subpath?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
tmpfs?: {
|
|
||||||
size?: number | string;
|
|
||||||
mode?: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
)[];
|
|
||||||
volumes_from?: string[];
|
|
||||||
working_dir?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `DefinitionsService`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface Ulimits {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `Ulimits`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-z]+$".
|
|
||||||
*/
|
|
||||||
[k: string]:
|
|
||||||
| (number | string)
|
|
||||||
| {
|
|
||||||
hard: number | string;
|
|
||||||
soft: number | string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
export interface BlkioLimit {
|
|
||||||
path?: string;
|
|
||||||
rate?: number | string;
|
|
||||||
}
|
|
||||||
export interface BlkioWeight {
|
|
||||||
path?: string;
|
|
||||||
weight?: number | string;
|
|
||||||
}
|
|
||||||
export interface DefinitionsHealthcheck {
|
|
||||||
disable?: boolean | string;
|
|
||||||
interval?: string;
|
|
||||||
retries?: number | string;
|
|
||||||
test?: string | string[];
|
|
||||||
timeout?: string;
|
|
||||||
start_period?: string;
|
|
||||||
start_interval?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `DefinitionsHealthcheck`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface DefinitionsServiceHook {
|
|
||||||
command?: Command;
|
|
||||||
user?: string;
|
|
||||||
privileged?: boolean | string;
|
|
||||||
working_dir?: string;
|
|
||||||
environment?: ListOrDict;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `DefinitionsServiceHook`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface PropertiesNetworks {
|
|
||||||
[k: string]: DefinitionsNetwork;
|
|
||||||
}
|
|
||||||
export interface PropertiesVolumes {
|
|
||||||
[k: string]: DefinitionsVolume;
|
|
||||||
}
|
|
||||||
export interface PropertiesSecrets {
|
|
||||||
[k: string]: DefinitionsSecret;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `PropertiesSecrets`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
export interface DefinitionsSecret {
|
|
||||||
name?: string;
|
|
||||||
environment?: string;
|
|
||||||
file?: string;
|
|
||||||
external?:
|
|
||||||
| boolean
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
labels?: ListOrDict;
|
|
||||||
driver?: string;
|
|
||||||
driver_opts?: {
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^.+$".
|
|
||||||
*/
|
|
||||||
[k: string]: string | number;
|
|
||||||
};
|
|
||||||
template_driver?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `DefinitionsSecret`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
export interface PropertiesConfigs {
|
|
||||||
[k: string]: DefinitionsConfig;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `PropertiesConfigs`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
|
|
||||||
*/
|
|
||||||
export interface DefinitionsConfig {
|
|
||||||
name?: string;
|
|
||||||
content?: string;
|
|
||||||
environment?: string;
|
|
||||||
file?: string;
|
|
||||||
external?:
|
|
||||||
| boolean
|
|
||||||
| string
|
|
||||||
| {
|
|
||||||
name?: string;
|
|
||||||
[k: string]: unknown;
|
|
||||||
};
|
|
||||||
labels?: ListOrDict;
|
|
||||||
template_driver?: string;
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `DefinitionsConfig`'s JSON-Schema definition
|
|
||||||
* via the `patternProperty` "^x-".
|
|
||||||
*/
|
|
||||||
[k: string]: unknown;
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
export * from 'lib/build';
|
|
||||||
export * from 'lib/types';
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
export enum ServiceName {
|
|
||||||
ImmichServer = 'immich-server',
|
|
||||||
ImmichMachineLearning = 'immich-machine-learning',
|
|
||||||
Postgres = 'immich-postgres',
|
|
||||||
Redis = 'immich-redis',
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ContainerName {
|
|
||||||
ImmichServer = 'immich-server',
|
|
||||||
ImmichMachineLearning = 'immich-machine-learning',
|
|
||||||
Postgres = 'immich-postgres',
|
|
||||||
Redis = 'immich-redis',
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BaseOptions = {
|
|
||||||
releaseVersion: string;
|
|
||||||
healthchecks?: boolean;
|
|
||||||
machineLearning: boolean;
|
|
||||||
containerNames?: boolean;
|
|
||||||
serverTimeZone?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type GeneratorOptions = (BaseOptions & FolderOptions & PostgresOptions) & RedisOptions;
|
|
||||||
|
|
||||||
export type FolderOptions = {
|
|
||||||
baseLocation: string;
|
|
||||||
encodedVideoLocation?: string;
|
|
||||||
libraryLocation?: string;
|
|
||||||
uploadLocation?: string;
|
|
||||||
profileLocation?: string;
|
|
||||||
thumbnailsLocation?: string;
|
|
||||||
backupsLocation?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type PostgresOptions = InternalPostgresOptions | ExternalPostgresOptions;
|
|
||||||
export type InternalPostgresOptions = {
|
|
||||||
postgresUser: string;
|
|
||||||
postgresPassword: string;
|
|
||||||
postgresDatabase: string;
|
|
||||||
postgresDataLocation: string;
|
|
||||||
};
|
|
||||||
export type ExternalPostgresOptions = { postgresUrl: string; postgresVectorExtension?: VectorExtension };
|
|
||||||
|
|
||||||
export type RedisOptions = ExternalRedisOptions | IoRedisOptions | { redis: true };
|
|
||||||
export type ExternalRedisOptions = {
|
|
||||||
redisHost: string;
|
|
||||||
redisPort: number;
|
|
||||||
redisDbIndex?: number;
|
|
||||||
redisUsername?: string;
|
|
||||||
redisPassword?: string;
|
|
||||||
redisSocket?: string;
|
|
||||||
};
|
|
||||||
export type IoRedisOptions = { redisUrl: string };
|
|
||||||
|
|
||||||
export type VectorExtension = 'pgvector' | 'pgvecto.rs';
|
|
||||||
|
|
||||||
export type HardwareAccelerationPlatform = 'nvenc' | 'quicksync' | 'rkmpp' | 'vappi' | 'vaapi-wsl';
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
import {
|
|
||||||
ExternalPostgresOptions,
|
|
||||||
ExternalRedisOptions,
|
|
||||||
GeneratorOptions,
|
|
||||||
IoRedisOptions,
|
|
||||||
PostgresOptions,
|
|
||||||
RedisOptions,
|
|
||||||
ServiceName,
|
|
||||||
} from 'lib/types';
|
|
||||||
|
|
||||||
export const isExternalPostgres = (options: PostgresOptions): options is ExternalPostgresOptions =>
|
|
||||||
'postgresUrl' in options;
|
|
||||||
|
|
||||||
export const isIoRedis = (options: RedisOptions): options is IoRedisOptions => 'redisUrl' in options;
|
|
||||||
export const isExternalRedis = (options: RedisOptions): options is ExternalRedisOptions => 'redisHost' in options;
|
|
||||||
|
|
||||||
export const asQueryParams = (values: Record<string, string | number | boolean | undefined>) => {
|
|
||||||
return new URLSearchParams(
|
|
||||||
Object.entries(values)
|
|
||||||
.filter(Boolean)
|
|
||||||
.map(([key, value]) => [key, String(value)]),
|
|
||||||
).toString();
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getImmichVolumes = (options: GeneratorOptions) => {
|
|
||||||
const {
|
|
||||||
baseLocation,
|
|
||||||
encodedVideoLocation,
|
|
||||||
uploadLocation,
|
|
||||||
backupsLocation,
|
|
||||||
profileLocation,
|
|
||||||
libraryLocation,
|
|
||||||
thumbnailsLocation,
|
|
||||||
} = options;
|
|
||||||
|
|
||||||
const internalBaseLocation = '/usr/src/app/upload';
|
|
||||||
|
|
||||||
const volumes = [`${baseLocation}:${internalBaseLocation}`];
|
|
||||||
|
|
||||||
for (const { override, folder } of [
|
|
||||||
{ override: encodedVideoLocation, folder: 'encoded-video' },
|
|
||||||
{ override: libraryLocation, folder: 'library' },
|
|
||||||
{ override: uploadLocation, folder: 'upload' },
|
|
||||||
{ override: profileLocation, folder: 'profile' },
|
|
||||||
{ override: thumbnailsLocation, folder: 'thumbs' },
|
|
||||||
{ override: backupsLocation, folder: 'backups' },
|
|
||||||
]) {
|
|
||||||
if (override) {
|
|
||||||
volumes.push(`${override}:${internalBaseLocation}/${folder}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
volumes.push(`/etc/localtime:/etc/localtime:ro`);
|
|
||||||
|
|
||||||
return volumes;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getImmichEnvironment = (options: GeneratorOptions) => {
|
|
||||||
const env: Record<string, string | number | undefined> = {};
|
|
||||||
if (isExternalPostgres(options)) {
|
|
||||||
env.DB_URL = options.postgresUrl;
|
|
||||||
env.DB_VECTOR_EXTENSION = options.postgresVectorExtension;
|
|
||||||
} else {
|
|
||||||
const { postgresUser, postgresPassword, postgresDatabase } = options;
|
|
||||||
env.DB_URL = `postgres://${postgresUser}:${postgresPassword}@${ServiceName.Postgres}:5432/${postgresDatabase}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isIoRedis(options)) {
|
|
||||||
env.REDIS_URL = options.redisUrl;
|
|
||||||
} else if (isExternalRedis(options)) {
|
|
||||||
env.REDIS_HOSTNAME = options.redisHost;
|
|
||||||
env.REDIS_PORT = options.redisPort;
|
|
||||||
env.REDIS_DBINDEX = options.redisDbIndex;
|
|
||||||
env.REDIS_USERNAME = options.redisUsername;
|
|
||||||
env.REDIS_PASSWORD = options.redisPassword;
|
|
||||||
env.REDIS_SOCKET = options.redisSocket;
|
|
||||||
} else {
|
|
||||||
env.REDIS_HOSTNAME = ServiceName.Redis;
|
|
||||||
}
|
|
||||||
|
|
||||||
env.TZ = options.serverTimeZone;
|
|
||||||
|
|
||||||
return env;
|
|
||||||
};
|
|
||||||
4555
docker/package-lock.json
generated
4555
docker/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "immich-docker",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"description": "A docker-compose generator for Immich",
|
|
||||||
"main": "index.js",
|
|
||||||
"scripts": {
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
|
||||||
"build": "vite build",
|
|
||||||
"generate": "npx tsx src/index.ts",
|
|
||||||
"lint": "eslint . --max-warnings 0",
|
|
||||||
"lint:fix": "npm run lint -- --fix",
|
|
||||||
"format": "prettier --check .",
|
|
||||||
"format:fix": "prettier --write ."
|
|
||||||
},
|
|
||||||
"type": "module",
|
|
||||||
"exports": "./dist/immich-docker.js",
|
|
||||||
"author": "team@immich.app",
|
|
||||||
"private": true,
|
|
||||||
"license": "GNU Affero General Public License version 3",
|
|
||||||
"dependencies": {
|
|
||||||
"js-yaml": "^4.1.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@eslint/eslintrc": "^3.2.0",
|
|
||||||
"@eslint/js": "^9.16.0",
|
|
||||||
"@types/js-yaml": "^4.0.9",
|
|
||||||
"@types/node": "^22.10.2",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
|
||||||
"@typescript-eslint/parser": "^8.18.0",
|
|
||||||
"eslint-plugin-unicorn": "^56.0.1",
|
|
||||||
"globals": "^15.13.0",
|
|
||||||
"json-schema-to-ts": "^3.1.1",
|
|
||||||
"prettier-plugin-organize-imports": "^4.1.0",
|
|
||||||
"prettier-plugin-sort-json": "^4.0.0",
|
|
||||||
"vite": "^6.0.3",
|
|
||||||
"vitest": "^2.1.8"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
global:
|
global:
|
||||||
scrape_interval: 15s
|
scrape_interval: 15s
|
||||||
evaluation_interval: 15s
|
evaluation_interval: 15s
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
||||||
import { buildYaml } from '../lib/index';
|
|
||||||
import { GeneratorOptions } from '../lib/types';
|
|
||||||
|
|
||||||
const main = () => {
|
|
||||||
const commonOptions = {
|
|
||||||
releaseVersion: 'v1.122.0',
|
|
||||||
baseLocation: '/home/immich/library',
|
|
||||||
serverTimeZone: 'America/New_York',
|
|
||||||
healthchecks: true,
|
|
||||||
machineLearning: true,
|
|
||||||
containerNames: true,
|
|
||||||
// hardwareAcceleration: 'nvenc',
|
|
||||||
};
|
|
||||||
|
|
||||||
const postgresOptions = {
|
|
||||||
postgresUser: 'postgres',
|
|
||||||
postgresPassword: 'postgres',
|
|
||||||
postgresDatabase: 'immich',
|
|
||||||
postgresDataLocation: '/home/immich/database',
|
|
||||||
};
|
|
||||||
|
|
||||||
const defaultOptions: GeneratorOptions = { ...commonOptions, ...postgresOptions, redis: true };
|
|
||||||
|
|
||||||
const samples: Array<{ name: string; options: GeneratorOptions }> = [
|
|
||||||
{ name: 'defaults', options: defaultOptions },
|
|
||||||
{ name: 'no-names', options: { ...defaultOptions, containerNames: false } },
|
|
||||||
{ name: 'no-healthchecks', options: { ...defaultOptions, healthchecks: false } },
|
|
||||||
{ name: 'external-ioredis', options: { ...defaultOptions, redisUrl: 'ioredis://<base64>' } },
|
|
||||||
{ name: 'external-redis', options: { ...defaultOptions, redisHost: '192.168.0.5', redisPort: 1234 } },
|
|
||||||
{
|
|
||||||
name: 'external-postgres',
|
|
||||||
options: {
|
|
||||||
...defaultOptions,
|
|
||||||
postgresUrl: 'postgres://immich:immich@localhost:5432/immich',
|
|
||||||
postgresVectorExtension: 'pgvector',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'split-storage',
|
|
||||||
options: {
|
|
||||||
...defaultOptions,
|
|
||||||
thumbnailsLocation: '/home/fast/thumbs',
|
|
||||||
encodedVideoLocation: '/home/fast/encoded-videos',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// TODO replace with vitest test files/scripts
|
|
||||||
mkdirSync('./examples', { recursive: true });
|
|
||||||
for (const { name, options } of samples) {
|
|
||||||
const spec = buildYaml(options);
|
|
||||||
|
|
||||||
const filename = `./examples/docker-compose.${name}.yaml`;
|
|
||||||
writeFileSync(filename, spec);
|
|
||||||
console.log(`Wrote ${filename}`);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
main();
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"allowJs": true,
|
|
||||||
"baseUrl": "./",
|
|
||||||
"checkJs": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"module": "es2020",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"outDir": "./dist",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"sourceMap": true,
|
|
||||||
"strict": true,
|
|
||||||
"target": "es2022",
|
|
||||||
"types": []
|
|
||||||
},
|
|
||||||
"include": ["lib"]
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"baseUrl": "./",
|
|
||||||
"declaration": true,
|
|
||||||
"emitDecoratorMetadata": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"experimentalDecorators": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"incremental": true,
|
|
||||||
"jsx": "react",
|
|
||||||
"lib": ["dom", "es2023"],
|
|
||||||
"module": "node16",
|
|
||||||
"moduleResolution": "node16",
|
|
||||||
"outDir": "./dist",
|
|
||||||
"preserveWatchOutput": true,
|
|
||||||
"removeComments": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"sourceMap": true,
|
|
||||||
"strict": true,
|
|
||||||
"target": "es2022"
|
|
||||||
},
|
|
||||||
"include": ["src", "lib"]
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
import { resolve } from 'node:path';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
lib: resolve('lib'),
|
|
||||||
src: resolve('src'),
|
|
||||||
test: resolve('test'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
entry: resolve(__dirname, 'lib/index.ts'),
|
|
||||||
name: 'immich-docker',
|
|
||||||
// the proper extensions will be added
|
|
||||||
fileName: 'immich-docker',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -1338,5 +1338,6 @@
|
|||||||
"years_ago": "{years, plural, one {# year} other {# years}} ago",
|
"years_ago": "{years, plural, one {# year} other {# years}} ago",
|
||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
"you_dont_have_any_shared_links": "You don't have any shared links",
|
"you_dont_have_any_shared_links": "You don't have any shared links",
|
||||||
"zoom_image": "Zoom Image"
|
"zoom_image": "Zoom Image",
|
||||||
|
"workflows": "Workflows"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,4 +17,14 @@
|
|||||||
</span>
|
</span>
|
||||||
{$t('review_duplicates')}
|
{$t('review_duplicates')}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href={AppRoute.WORKFLOWS}
|
||||||
|
class="w-full hover:bg-gray-100 dark:hover:bg-immich-dark-gray flex items-center gap-4 p-4"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
><Icon path={mdiContentDuplicate} class="text-immich-primary dark:text-immich-dark-primary" size="24" />
|
||||||
|
</span>
|
||||||
|
{$t('workflows')}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ export enum AppRoute {
|
|||||||
|
|
||||||
UTILITIES = '/utilities',
|
UTILITIES = '/utilities',
|
||||||
DUPLICATES = '/utilities/duplicates',
|
DUPLICATES = '/utilities/duplicates',
|
||||||
|
WORKFLOWS = '/utilities/workflows',
|
||||||
|
|
||||||
FOLDERS = '/folders',
|
FOLDERS = '/folders',
|
||||||
TAGS = '/tags',
|
TAGS = '/tags',
|
||||||
|
|||||||
14
web/src/routes/(user)/utilities/workflows/+page.svelte
Normal file
14
web/src/routes/(user)/utilities/workflows/+page.svelte
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
|
||||||
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: PageData;
|
||||||
|
}
|
||||||
|
|
||||||
|
let { data }: Props = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<UserPageLayout title={data.meta.title}>
|
||||||
|
<div class="w-full h-full bg-gray-50 dark:bg-immich-dark-gray rounded-xl p-6">hello</div>
|
||||||
|
</UserPageLayout>
|
||||||
14
web/src/routes/(user)/utilities/workflows/+page.ts
Normal file
14
web/src/routes/(user)/utilities/workflows/+page.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { authenticate } from '$lib/utils/auth';
|
||||||
|
import { getFormatter } from '$lib/utils/i18n';
|
||||||
|
import type { PageLoad } from './$types';
|
||||||
|
|
||||||
|
export const load = (async () => {
|
||||||
|
await authenticate();
|
||||||
|
const $t = await getFormatter();
|
||||||
|
|
||||||
|
return {
|
||||||
|
meta: {
|
||||||
|
title: $t('workflows'),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}) satisfies PageLoad;
|
||||||
Reference in New Issue
Block a user