docs: update example
This commit is contained in:
parent
942e7a04f5
commit
3c4fbfadac
1 changed files with 35 additions and 8 deletions
|
@ -35,6 +35,14 @@ export function immichStack(props: ImmichStackOptions) {
|
||||||
// todo volumes
|
// todo volumes
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const immichEnv = {
|
||||||
|
DB_HOSTNAME: database.name,
|
||||||
|
DB_USERNAME: props.postgres.username,
|
||||||
|
DB_PASSWORD: props.postgres.password,
|
||||||
|
DB_DATABASE_NAME: props.postgres.database,
|
||||||
|
REDIS_HOSTNAME: redis.name,
|
||||||
|
};
|
||||||
|
|
||||||
const immichServer = new Service("immich-server", {
|
const immichServer = new Service("immich-server", {
|
||||||
image: `ghcr.io/immich-app/immich-server:${
|
image: `ghcr.io/immich-app/immich-server:${
|
||||||
props.immichVersion ?? "release"
|
props.immichVersion ?? "release"
|
||||||
|
@ -43,17 +51,36 @@ export function immichStack(props: ImmichStackOptions) {
|
||||||
command: ["start.sh", "immich"],
|
command: ["start.sh", "immich"],
|
||||||
dependsOn: [database, redis],
|
dependsOn: [database, redis],
|
||||||
// todo volumes
|
// todo volumes
|
||||||
environment: {
|
environment: immichEnv,
|
||||||
DB_HOSTNAME: database.name,
|
|
||||||
DB_USERNAME: props.postgres.username,
|
|
||||||
DB_PASSWORD: props.postgres.password,
|
|
||||||
DB_DATABASE_NAME: props.postgres.database,
|
|
||||||
REDIS_HOSTNAME: redis.name,
|
|
||||||
},
|
|
||||||
ports: ["2283:3001"],
|
ports: ["2283:3001"],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const immichMicroservices = new Service("immich-microservices", {
|
||||||
|
image: `ghcr.io/immich-app/immich-server:${
|
||||||
|
props.immichVersion ?? "release"
|
||||||
|
}`,
|
||||||
|
restart: "unless-stopped",
|
||||||
|
command: ["start.sh", "microservices"],
|
||||||
|
dependsOn: [database, redis],
|
||||||
|
// todo volumes
|
||||||
|
environment: immichEnv,
|
||||||
|
});
|
||||||
|
|
||||||
|
const immichMachineLearning = new Service("immich-machine-learning", {
|
||||||
|
image: `ghcr.io/immich-app/immich-machine-learning:${
|
||||||
|
props.immichVersion ?? "release"
|
||||||
|
}`,
|
||||||
|
// todo volumes
|
||||||
|
environment: immichEnv,
|
||||||
|
});
|
||||||
|
|
||||||
return new Stack("immich", {
|
return new Stack("immich", {
|
||||||
services: [redis, database, immichServer],
|
services: [
|
||||||
|
redis,
|
||||||
|
database,
|
||||||
|
immichServer,
|
||||||
|
immichMicroservices,
|
||||||
|
immichMachineLearning,
|
||||||
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue