jrosell commited on
Commit
49c19cf
·
1 Parent(s): 186513f

ambiorix.dbname

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. app.R +3 -3
Dockerfile CHANGED
@@ -52,7 +52,7 @@ COPY --chown=user . $HOME/app
52
 
53
  # Entry
54
  EXPOSE 7860
55
- CMD R -e "print(nchar(Sys.getenv('GITHUB_PAT'))); print(here::here()); ; tmp_file <- tempfile(); writeLines('Created', tmp_file); if (file.exists(tmp_file)) {unlink(tmp_file); print('Deleted')}; options('ambiorix.dbname'=paste0(tmp_file,'.sqlite')); source('app.R'); "
56
 
57
 
58
 
 
52
 
53
  # Entry
54
  EXPOSE 7860
55
+ CMD R -e "print(nchar(Sys.getenv('GITHUB_PAT'))); print(here::here()); ; tmp_file <- tempfile(); print(tmp_file); writeLines('content', tmp_file); if (file.exists(tmp_file)) {unlink(tmp_file); print('Deleted')}; options('ambiorix.dbname'=paste0(tmp_file,'.sqlite')); print(getOption('ambiorix.dbname')); source('app.R'); "
56
 
57
 
58
 
app.R CHANGED
@@ -74,9 +74,9 @@ render_row <- \(item) {
74
  counter <- 0
75
  c(app, context, items) %<-%
76
  ambhtmx_app(
77
- "items.sqlite",
78
- host = getOption("ambiorix.host"),
79
- port = getOption("ambiorix.port"),
80
  value = tibble(
81
  id = character(1),
82
  name = character(1),
 
74
  counter <- 0
75
  c(app, context, items) %<-%
76
  ambhtmx_app(
77
+ dbname = getOption("ambiorix.dbname") %||% "items.sqlite",
78
+ host = getOption("ambiorix.host") %||% "127.0.0.1",
79
+ port = getOption("ambiorix.port")%||% "3000",
80
  value = tibble(
81
  id = character(1),
82
  name = character(1),