mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-02 23:09:26 +02:00
feat: add flatnotes as app
This commit is contained in:
parent
1df7c490a6
commit
033cc10420
|
|
@ -19,6 +19,7 @@ export class DockerService {
|
||||||
public static OLLAMA_SERVICE_NAME = 'nomad_ollama';
|
public static OLLAMA_SERVICE_NAME = 'nomad_ollama';
|
||||||
public static OPEN_WEBUI_SERVICE_NAME = 'nomad_open_webui';
|
public static OPEN_WEBUI_SERVICE_NAME = 'nomad_open_webui';
|
||||||
public static CYBERCHEF_SERVICE_NAME = 'nomad_cyberchef';
|
public static CYBERCHEF_SERVICE_NAME = 'nomad_cyberchef';
|
||||||
|
public static FLATNOTES_SERVICE_NAME = 'nomad_flatnotes';
|
||||||
public static NOMAD_STORAGE_ABS_PATH = '/opt/project-nomad/storage';
|
public static NOMAD_STORAGE_ABS_PATH = '/opt/project-nomad/storage';
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
@ -219,8 +220,8 @@ export class DockerService {
|
||||||
...(containerConfig?.HostConfig && { HostConfig: containerConfig.HostConfig }),
|
...(containerConfig?.HostConfig && { HostConfig: containerConfig.HostConfig }),
|
||||||
...(containerConfig?.WorkingDir && { WorkingDir: containerConfig.WorkingDir }),
|
...(containerConfig?.WorkingDir && { WorkingDir: containerConfig.WorkingDir }),
|
||||||
...(containerConfig?.ExposedPorts && { ExposedPorts: containerConfig.ExposedPorts }),
|
...(containerConfig?.ExposedPorts && { ExposedPorts: containerConfig.ExposedPorts }),
|
||||||
|
...(containerConfig?.Env && { Env: containerConfig.Env }),
|
||||||
...(service.container_command ? { Cmd: service.container_command.split(' ') } : {}),
|
...(service.container_command ? { Cmd: service.container_command.split(' ') } : {}),
|
||||||
...(service.service_name === 'open-webui' ? { Env: ['WEBUI_AUTH=False', 'PORT=3000', 'OLLAMA_BASE_URL=http://127.0.0.1:11434'] } : {}), // Special case for Open WebUI
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this._broadcast(service.service_name, 'starting', `Starting Docker container for service ${service.service_name}...`);
|
this._broadcast(service.service_name, 'starting', `Starting Docker container for service ${service.service_name}...`);
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,8 @@ export default class ServiceSeeder extends BaseSeeder {
|
||||||
RestartPolicy: { Name: 'unless-stopped' },
|
RestartPolicy: { Name: 'unless-stopped' },
|
||||||
NetworkMode: 'host',
|
NetworkMode: 'host',
|
||||||
Binds: [`${DockerService.NOMAD_STORAGE_ABS_PATH}/open-webui:/app/backend/data`]
|
Binds: [`${DockerService.NOMAD_STORAGE_ABS_PATH}/open-webui:/app/backend/data`]
|
||||||
}
|
},
|
||||||
|
Env: ['WEBUI_AUTH=False', 'PORT=3000', 'OLLAMA_BASE_URL=http://127.0.0.1:11434']
|
||||||
}),
|
}),
|
||||||
ui_location: '3000',
|
ui_location: '3000',
|
||||||
installed: false,
|
installed: false,
|
||||||
|
|
@ -90,6 +91,24 @@ export default class ServiceSeeder extends BaseSeeder {
|
||||||
is_dependency_service: false,
|
is_dependency_service: false,
|
||||||
depends_on: null,
|
depends_on: null,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
service_name: DockerService.FLATNOTES_SERVICE_NAME,
|
||||||
|
container_image: 'dullage/flatnotes:latest',
|
||||||
|
container_command: null,
|
||||||
|
container_config: JSON.stringify({
|
||||||
|
HostConfig: {
|
||||||
|
RestartPolicy: { Name: 'unless-stopped' },
|
||||||
|
PortBindings: { '8080/tcp': [{ HostPort: '8200' }] },
|
||||||
|
Binds: [`${DockerService.NOMAD_STORAGE_ABS_PATH}/flatnotes:/data`]
|
||||||
|
},
|
||||||
|
ExposedPorts: { '8080/tcp': {} },
|
||||||
|
Env: ['FLATNOTES_AUTH_TYPE=none']
|
||||||
|
}),
|
||||||
|
ui_location: '8200',
|
||||||
|
installed: false,
|
||||||
|
is_dependency_service: false,
|
||||||
|
depends_on: null,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
async run() {
|
async run() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user