mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
install from a hand-written oci-compose; Log2RAM journal fix
OCI manager Apps - "Install an image that is not in the catalog" reads an oci-compose from a file of the host or from an address. - A file written by hand states the image, its ports, variables and volumes, and what the installation asks; the rest is completed when it is read. A complete file, or the record of an installation, is installed as it is, and of a record only the template is used. - Errors name the field they are in, also on a host without python3-jsonschema. - oci/README.md describes the engine and the oci-compose block by block, with two examples in oci/examples/. - The documentation page of the option covers it, in English and Spanish. Log2RAM (reported by @f3rs3n) - The sync removes the old active journal file from the disk copy, so a boot no longer restores it and journald deletes its oldest archives first. Log2RAM optimization 1.7; it takes effect from the next reboot. Translations - The bot keeps "oci-compose" as written. - Spanish texts for the new option and for the Log2RAM notice.
This commit is contained in:
@@ -5,6 +5,10 @@ import { DocPage } from "@/components/docs/DocBlocks"
|
||||
const NAMESPACE = "docs.ociManager.customImage"
|
||||
const URL = "https://proxmenux.com/docs/oci-manager/custom-image"
|
||||
|
||||
const LINKS = {
|
||||
readmeLink: "https://github.com/MacRimi/ProxMenux/blob/main/oci/README.md#the-oci-compose-block-by-block",
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: { params: Promise<{ locale: string }> }): Promise<Metadata> {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale, namespace: `${NAMESPACE}.meta` })
|
||||
@@ -19,5 +23,5 @@ export async function generateMetadata({ params }: { params: Promise<{ locale: s
|
||||
export default async function Page({ params }: { params: Promise<{ locale: string }> }) {
|
||||
const { locale } = await params
|
||||
setRequestLocale(locale)
|
||||
return <DocPage locale={locale} namespace={NAMESPACE} minutes={6} />
|
||||
return <DocPage locale={locale} namespace={NAMESPACE} minutes={7} links={LINKS} />
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
"id": "sources",
|
||||
"title": "How the image is described",
|
||||
"intro": "The first screen asks how the image is described. There are four ways to give a complete definition and a fifth that uses only the image name.",
|
||||
"intro": "The first screen asks how the image is described. Four ways give a definition that is translated, a fifth uses only the image name, and two read an oci-compose that is already written.",
|
||||
"blocks": [
|
||||
{
|
||||
"table": {
|
||||
@@ -33,7 +33,9 @@
|
||||
["Read its Compose file from a file of this host", "A path on the node, <code>/root/docker-compose.yml</code> by default. The file must exist and be at most 256 KiB."],
|
||||
["Download its Compose file from an address", "An <code>http://</code> or <code>https://</code> address that serves the raw YAML. At most 256 KiB are downloaded."],
|
||||
["Paste its docker run command in the terminal", "The command published by the project. Ports, environment, volumes, devices, capabilities, user, shared memory and the other supported options are translated."],
|
||||
["Only the image reference, with no Compose file", "A reference such as <code>ghcr.io/user/application:latest</code>. The registry is queried and the OCI metadata of the image is kept."]
|
||||
["Only the image reference, with no Compose file", "A reference such as <code>ghcr.io/user/application:latest</code>. The registry is queried and the OCI metadata of the image is kept."],
|
||||
["Read an oci-compose from a file of this host", "A JSON file on the node, <code>/root/oci-compose.json</code> by default, of at most 2 MiB. It is not translated: it is checked and installed as it is written."],
|
||||
["Download an oci-compose from an address", "An <code>http://</code> or <code>https://</code> address that serves the JSON file. At most 2 MiB are downloaded."]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -41,7 +43,7 @@
|
||||
"figure": {
|
||||
"src": "/oci-manager/custom-source-menu.png",
|
||||
"alt": "Menu that asks how an image that is not in the catalog is described",
|
||||
"caption": "The five ways to describe an image that is not in the catalog."
|
||||
"caption": "The ways to describe an image that is not in the catalog."
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -112,6 +114,43 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "oci-compose",
|
||||
"title": "An oci-compose written by hand",
|
||||
"intro": "An oci-compose is the JSON file an application is installed from. The catalog keeps one for each of its applications, and the same format can be written by hand and installed with this option.",
|
||||
"blocks": [
|
||||
{
|
||||
"p": "One written by hand states what its author decides: the image, its ports, variables and volumes, and what the installation asks. ProxMenux completes the rest when it reads the file. It can say what a Compose file cannot: the text of a question, a password generated during the installation, a GPU profile, the owner of each volume, the check of the first start or the credentials shown at the end."
|
||||
},
|
||||
{
|
||||
"steps": {
|
||||
"items": [
|
||||
{
|
||||
"title": "Check",
|
||||
"body": "A file with errors is not installed. Each error names the field it is in, and a file that is not valid JSON reports the line and the column."
|
||||
},
|
||||
{
|
||||
"title": "Review",
|
||||
"body": "A valid file shows what it installs: image, web address, ports, persistent paths, the variables the installation asks for and the files it writes."
|
||||
},
|
||||
{
|
||||
"title": "Install",
|
||||
"body": "The installation is the one of any application of the catalog, with default or advanced settings."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"calloutWarning": {
|
||||
"title": "A file that decides privileges",
|
||||
"body": "An oci-compose decides what is mounted in the container and with which privileges. The review says it before installing: install only files that come from a source you trust."
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": "The format is described block by block, with two complete examples, in the <readmeLink>README of the OCI engine</readmeLink>. The record of an installation can be read the same way: only the template it was installed from is used, and none of the answers of that installation."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "limits",
|
||||
"title": "Definitions that are not installed",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{
|
||||
"id": "sources",
|
||||
"title": "Cómo se describe la imagen",
|
||||
"intro": "La primera pantalla pregunta cómo se describe la imagen. Hay cuatro formas de aportar una definición completa y una quinta que usa solo el nombre de la imagen.",
|
||||
"intro": "La primera pantalla pregunta cómo se describe la imagen. Cuatro formas aportan una definición que se traduce, una quinta usa solo el nombre de la imagen y dos leen un oci-compose ya escrito.",
|
||||
"blocks": [
|
||||
{
|
||||
"table": {
|
||||
@@ -33,7 +33,9 @@
|
||||
["Leer su archivo Compose desde un archivo de este host", "Una ruta del nodo, <code>/root/docker-compose.yml</code> por defecto. El archivo debe existir y ocupar como máximo 256 KiB."],
|
||||
["Descargar su archivo Compose desde una dirección", "Una dirección <code>http://</code> o <code>https://</code> que sirva el YAML sin procesar. Se descargan como máximo 256 KiB."],
|
||||
["Pegar su comando docker run en la terminal", "El comando que publica el proyecto. Se traducen puertos, entorno, volúmenes, dispositivos, capacidades, usuario, memoria compartida y el resto de opciones admitidas."],
|
||||
["Solo la referencia de la imagen, sin archivo Compose", "Una referencia como <code>ghcr.io/usuario/aplicacion:latest</code>. Se consulta el registro y se conservan los metadatos OCI de la imagen."]
|
||||
["Solo la referencia de la imagen, sin archivo Compose", "Una referencia como <code>ghcr.io/user/application:latest</code>. Se consulta el registro y se conservan los metadatos OCI de la imagen."],
|
||||
["Leer un oci-compose desde un archivo de este host", "Un archivo JSON del nodo, <code>/root/oci-compose.json</code> por defecto, de 2 MiB como máximo. No se traduce: se comprueba y se instala tal como está escrito."],
|
||||
["Descargar un oci-compose desde una dirección", "Una dirección <code>http://</code> o <code>https://</code> que sirva el archivo JSON. Se descargan como máximo 2 MiB."]
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -41,7 +43,7 @@
|
||||
"figure": {
|
||||
"src": "/oci-manager/custom-source-menu.png",
|
||||
"alt": "Menú que pregunta cómo se describe una imagen que no está en el catálogo",
|
||||
"caption": "Las cinco formas de describir una imagen que no está en el catálogo."
|
||||
"caption": "Las formas de describir una imagen que no está en el catálogo."
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -112,6 +114,43 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "oci-compose",
|
||||
"title": "Un oci-compose escrito a mano",
|
||||
"intro": "Un oci-compose es el archivo JSON desde el que se instala una aplicación. El catálogo guarda uno por cada aplicación, y el mismo formato puede escribirse a mano e instalarse con esta opción.",
|
||||
"blocks": [
|
||||
{
|
||||
"p": "El que se escribe a mano indica lo que decide su autor: la imagen, sus puertos, variables y volúmenes, y lo que pregunta la instalación. ProxMenux completa el resto al leer el archivo. Puede decir lo que un archivo Compose no puede: el texto de una pregunta, una contraseña generada durante la instalación, un perfil de GPU, el propietario de cada volumen, la comprobación del primer arranque o las credenciales que se muestran al terminar."
|
||||
},
|
||||
{
|
||||
"steps": {
|
||||
"items": [
|
||||
{
|
||||
"title": "Comprobar",
|
||||
"body": "Un archivo con errores no se instala. Cada error indica el campo en el que está, y un archivo que no es JSON válido indica la línea y la columna."
|
||||
},
|
||||
{
|
||||
"title": "Revisar",
|
||||
"body": "Un archivo válido muestra lo que instala: imagen, dirección web, puertos, rutas persistentes, las variables que pide la instalación y los archivos que escribe."
|
||||
},
|
||||
{
|
||||
"title": "Instalar",
|
||||
"body": "La instalación es la de cualquier aplicación del catálogo, con ajustes por defecto o avanzados."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"calloutWarning": {
|
||||
"title": "Un archivo que decide privilegios",
|
||||
"body": "Un oci-compose decide qué se monta en el contenedor y con qué privilegios. El resumen lo indica antes de instalar: instala solo archivos que vengan de una fuente de confianza."
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": "El formato se describe bloque a bloque, con dos ejemplos completos, en el <readmeLink>README del motor OCI</readmeLink>. El registro de una instalación se lee de la misma forma: solo se usa la plantilla con la que se instaló, y ninguna de las respuestas de esa instalación."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "limits",
|
||||
"title": "Definiciones que no se instalan",
|
||||
@@ -123,7 +162,7 @@
|
||||
"Un Dockerfile sin imagen publicada: la imagen debe construirse y publicarse antes en un registro OCI.",
|
||||
"Un archivo Compose con varios servicios: queda bloqueado porque describe más de una imagen. Esta opción instala un único contenedor.",
|
||||
"<code>configs</code>, secretos externos o formatos de dispositivo que no pueden traducirse sin ambigüedad.",
|
||||
"Sustituciones del shell como <code>$(comando)</code>: debe escribirse el valor resultante.",
|
||||
"Sustituciones del shell como <code>$(command)</code>: debe escribirse el valor resultante.",
|
||||
"Opciones de <code>docker run</code> no reconocidas y <code>--env-file</code>: se lee en su lugar un archivo Compose explícito."
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user