CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/util/db-schema/compute-images.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Table } from "./types";
7
8
/*
9
What software environments there are available.
10
*/
11
Table({
12
name: "compute_images",
13
rules: {
14
primary_key: ["id"],
15
anonymous: true,
16
user_query: {
17
get: {
18
throttle_changes: 30000,
19
pg_where: [],
20
fields: {
21
id: null,
22
src: null,
23
type: null,
24
display: null,
25
url: null,
26
desc: null,
27
path: null,
28
disabled: null,
29
},
30
},
31
},
32
},
33
fields: {
34
id: {
35
type: "string",
36
desc: "docker image 'name:tag', where tag defaults to 'latest'",
37
},
38
src: {
39
type: "string",
40
desc: "source of the image (likely https://github [...] .git)",
41
},
42
type: {
43
type: "string",
44
desc: "for now, this is either 'legacy' or 'custom'",
45
},
46
display: {
47
type: "string",
48
desc: "(optional) user-visible name (defaults to id)",
49
},
50
url: {
51
type: "string",
52
desc: "(optional) where the user can learn more about it",
53
},
54
desc: {
55
type: "string",
56
desc: "(optional) markdown text to talk more about this",
57
},
58
path: {
59
type: "string",
60
desc:
61
"(optional) point user to either a filename like index.ipynb or a directory/",
62
},
63
disabled: {
64
type: "boolean",
65
desc: "(optional) if set and true, do not offer as a selection",
66
},
67
},
68
});
69
70