Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
134662b
First pass at museum mode where can specify a URL of a start script w…
fghalasz Oct 29, 2025
80bec28
Fix typo in server/js/medley.js
fghalasz Oct 29, 2025
6cf61ae
Fix typo in client/js/main.js
fghalasz Oct 29, 2025
f02e6cc
Fix up a small bit of code in /server/js/medley.js
fghalasz Oct 29, 2025
b04276c
Fix up typo in /server/js/medley.js
fghalasz Oct 29, 2025
75b4baa
Fix setting of START_SCRIPT in run-online-medley script
fghalasz Oct 30, 2025
a186c79
fix misformed medleyEnvs function.
fghalasz Oct 30, 2025
0e4191d
Updating ONLINE-INIT to latest
fghalasz Oct 30, 2025
47b4fbd
Create a start script for testing museum mode
fghalasz Oct 31, 2025
928b207
Adding some debugging code
fghalasz Oct 31, 2025
7cd2126
Adding some debugging code
fghalasz Oct 31, 2025
3d49391
Adding some debugging code
fghalasz Oct 31, 2025
9d36aa2
Adding some debugging code
fghalasz Oct 31, 2025
63c5b61
Removing some debugging code; fixing typo in medley.js
fghalasz Oct 31, 2025
991999b
Adding some debugging code
fghalasz Oct 31, 2025
9115104
Adding some debugging code
fghalasz Oct 31, 2025
cca61e6
Adding some debugging code
fghalasz Oct 31, 2025
5e398b8
Adding some debugging code
fghalasz Nov 1, 2025
6b78411
Debugging
fghalasz Nov 1, 2025
6c5faf3
Debugging
fghalasz Nov 1, 2025
ae08c15
Rename START_KINETIC to START-KINETIC
fghalasz Nov 1, 2025
040eb4d
Renaming START_KINETIC to START-KINETIC and adding ADD.PROCESS to it.
fghalasz Nov 1, 2025
7839dac
Fixing up delete of START_KINETIC from last commit
fghalasz Nov 1, 2025
43bee9e
Fixing START-KINETIC
fghalasz Nov 1, 2025
8d0b6e6
Add second mudeum-mode sample start script focused on pamoroso's INSP…
fghalasz Nov 6, 2025
826768a
Updated START-INSPHEX start-script - this time it actually works
fghalasz Nov 7, 2025
43d785e
Scooching INSPHEX window over a bit in START-INSPHEX start script
fghalasz Nov 7, 2025
d9d797b
Move start-scripts to top level of online repo. Add URLs used with t…
fghalasz Nov 7, 2025
48fb93b
Fix start-script URLs
fghalasz Nov 7, 2025
67ee9ae
Update URL to use 'github.com' instead of 'raw.githubusercontent.com'
fghalasz Nov 7, 2025
72b293c
Merge branch 'main' into fgh_museum-mode
fghalasz Nov 8, 2025
958349c
Add new routes for autologin, /demo/guest is equivalent to the curren…
fghalasz Nov 8, 2025
3906ca4
Fixing res.redirect statements to include query
fghalasz Nov 8, 2025
2299b53
Debugging /demo/login route
fghalasz Nov 8, 2025
73bd1b9
Fix typo
fghalasz Nov 8, 2025
cedf381
Debugging /demo/login route
fghalasz Nov 8, 2025
08f5e50
Debugging /demo/login route
fghalasz Nov 8, 2025
e7b0bb6
Redoing routing for /demo/guest and /demo/login paths.
fghalasz Nov 9, 2025
b1ef52c
Add relogin route for /demo routes.
fghalasz Nov 10, 2025
fb52628
Fix typo
fghalasz Nov 10, 2025
4c13770
Fix relogin page; fix adding autologin=true to originalURL
fghalasz Nov 10, 2025
d891c83
Fix typo
fghalasz Nov 10, 2025
2557e31
Fixing handling of encode and decode of URLS
fghalasz Nov 10, 2025
4402053
Debugging relogin route
fghalasz Nov 10, 2025
8ded780
Still debugging /demo/login
fghalasz Nov 10, 2025
24f502b
Still debugging /demo/login
fghalasz Nov 10, 2025
b9a2f03
Fixing up relogin page; adding install_mongodb thats just been hangin…
fghalasz Nov 12, 2025
d9bade1
Fixing up relogin page
fghalasz Nov 12, 2025
83c2c37
Switch yes/no labels on relogin
fghalasz Nov 12, 2025
a93e0f5
Update START-INSPHEX to use new HEXDUMP function signature. Update t…
fghalasz Nov 12, 2025
44f024a
Fix relogin when using &notecards=1
fghalasz Nov 12, 2025
539bf6d
Merge branch 'fgh_museum-mode' of https://github.com/Interlisp/online…
fghalasz Nov 12, 2025
c3b4f40
Update START-INSPHEX to fix wget filename issues
fghalasz Nov 12, 2025
f83ab09
Fix issues with unix vs lisp filenames in ShellWget
fghalasz Nov 12, 2025
a113f19
Update URL for KINETIC script
fghalasz Nov 12, 2025
42e2d5a
Adding start-script option to main Run Medley page
fghalasz Nov 12, 2025
d2f3ea3
Merge branch 'fgh_museum-mode' of https://github.com/Interlisp/online…
fghalasz Nov 12, 2025
9cb9517
Polishing start-script entry on run medley page
fghalasz Nov 12, 2025
2c7fef8
Fix typo
fghalasz Nov 12, 2025
4d5de1b
Fix const -> let
fghalasz Nov 12, 2025
fb0eec9
Adjusting start-script typein element
fghalasz Nov 13, 2025
a4055bf
Adjusting start-script typein element
fghalasz Nov 13, 2025
d0cc9e7
Adjusting start-script typein element
fghalasz Nov 13, 2025
73e4c8e
Still adjusting start-script typein
fghalasz Nov 13, 2025
dee8a0e
Still adjusting start-script typein
fghalasz Nov 13, 2025
9f8c602
Still adjusting start-script typein
fghalasz Nov 13, 2025
fa8d462
Still adjusting start-script typein
fghalasz Nov 13, 2025
38194a6
Still adjusting start-script typein
fghalasz Nov 14, 2025
a4ec07d
Still adjusting start-script typein
fghalasz Nov 14, 2025
3971f5f
Still adjusting start-script typein
fghalasz Nov 14, 2025
f11a42a
Still adjusting start-script typein
fghalasz Nov 14, 2025
3d5a247
Still adjusting start-script typein
fghalasz Nov 14, 2025
c3c2f96
Storing start_script_url in local store so saved between invocations
fghalasz Nov 14, 2025
d9e4744
Fixing error messages on login page
fghalasz Nov 14, 2025
8627d45
docs/Demo_mode.md created from https://stackedit.io/
fghalasz Nov 16, 2025
93ffbf7
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
77bc972
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
e3d033f
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
3141b01
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
48a57a7
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
ff027c6
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
f8e05ce
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
47f3290
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 16, 2025
6721ed5
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
568c7c0
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4371d1b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
795ed2d
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
bd3e86d
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
871d12b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
85b1497
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
169157d
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
1c801ae
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
aff0e04
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
f9a0fc8
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
3eacb70
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4b71c88
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
ebfa996
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
1a6c8cd
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
f5458c7
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
eebc768
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
c15a7f9
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
d2b9d61
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
e36ea7c
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
44dd9a1
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
bb95e0b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
b33fdd4
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
d0842b9
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
d5e1ae0
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
f274beb
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
e14b0e9
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
a86ae00
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
299cf51
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
ddd3fcb
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
6ebe691
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
2021f2f
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4c09969
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
9254cc9
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4bfa2a0
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
3d476b9
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
ad4b661
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
0fbfbc0
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4b00ac4
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
eac6ead
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
21b0381
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
7dd8415
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
dc7aa07
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4e4df7b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
1fd4253
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
9aa52f3
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4e0c4fc
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
0cce787
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
d305152
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
6a6a8f9
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
1f3c575
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
b5a9daf
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
06b4717
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
4cbfd0b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
569f939
docs/Demo_mode.eyJicmFuY2giOiJmZ2hfbXVzZXVtLW1vZGUiLCJvd25lciI6ImludG…
fghalasz Nov 17, 2025
3d03e78
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
041963b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
716f6e3
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
71c80cd
docs/Demo_mode.eyJicmFuY2giOiJmZ2hfbXVzZXVtLW1vZGUiLCJvd25lciI6ImludG…
fghalasz Nov 17, 2025
3cbc376
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
683b661
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
e1ddc31
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
9552f6f
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
fb54578
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
c7b1f10
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
ec7cba2
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
6e31ec2
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
917fa95
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
db969ff
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
e428528
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
300a720
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
43ca818
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
49886cf
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
f69e7aa
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
013ba8b
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
6365187
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
bc47f1a
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
e84db58
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
d0c873d
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
3980661
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
21aa5bc
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
2f0f711
docs/Demo_mode.md updated from https://stackedit.io/
fghalasz Nov 17, 2025
bf6beb6
Cleaning stackedit garbage out of Demo_mode.md file
fghalasz Nov 17, 2025
5b9d524
Fix up some formatting in Demo_mode.md
fghalasz Nov 17, 2025
244cadb
Fix a few typos in Demo_mode.md
fghalasz Nov 17, 2025
063c292
Rename ShellWget to be ShellHttpGet; ShellHttpGet now tries to use cu…
fghalasz Nov 19, 2025
60d222c
Add an python-based simple https server to the Medley Docker image. …
fghalasz Dec 13, 2025
86eb731
Smalll fix in Dockerfile_medley to get mkdir to work
fghalasz Dec 13, 2025
683d683
Debug creating of MEDLEY_WEBDIR in Dockerfile_medley
fghalasz Dec 13, 2025
943e266
Still debugging webfiles dir creation
fghalasz Dec 13, 2025
8457271
Moving the creation of the MEDLEY_WEBDIR to run-online-medley script …
fghalasz Dec 13, 2025
cc0ace4
Fix owner/group of MEDLEY_WEBDIR; Fix handling of TLS certs/key for H…
fghalasz Dec 13, 2025
e5489a3
Update web-portal/medley.js to allow network addresses 4XXXX thru whe…
fghalasz Dec 13, 2025
a9b7be1
Merge branch 'fgh_museum-mode' into fgh_http-server
fghalasz Dec 14, 2025
e2b5e40
Add functions to ONLINEUTILS that open webfiles in the medley file sy…
fghalasz Dec 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docker_medley/Dockerfile_medley
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ ENV NOTECARDS_RELEASE=$NOTECARDS_RELEASE
ARG DEBIAN_FRONTEND=noninteractive
ARG USER_NAME=medley
ARG HOMEDIR=/home/${USER_NAME}
ARG OIO_INSTALLDIR=/usr/local/interlisp/online
ARG MEDLEY_INSTALLDIR=/usr/local/interlisp/medley
ARG MEDLEY_WEBDIR=${HOMEDIR}/il/webfiles
ENV OIO_INSTALLDIR=${OIO_INSTALLDIR}
ENV MEDLEY_INSTALLDIR=${MEDLEY_INSTALLDIR}
ENV MEDLEY_USERDIR=${HOMEDIR}/il
ENV MEDLEY_WEBDIR=${MEDLEY_WEBDIR}
ARG MAIKO_INSTALLDIR=/usr/local/interlisp/maiko
ENV MAIKO_INSTALLDIR=${MAIKO_INSTALLDIR}

Expand Down Expand Up @@ -107,13 +111,16 @@ RUN mkdir -p ${MEDLEY_USERDIR} \
&& chown ${USER_NAME}:${USER_NAME} ${MEDLEY_USERDIR}/vmem

# copy the run-XXX and other scripts into ${MEDLEY_INSTALLDIR}/../online/bin
ARG ONLINE_BINDIR=${MEDLEY_INSTALLDIR}/../online/bin
ARG ONLINE_BINDIR=${OIO_INSTALLDIR}/bin
RUN mkdir -p ${ONLINE_BINDIR} \
&& chown root:root ${ONLINE_BINDIR}
COPY scripts/* ${ONLINE_BINDIR}
RUN chmod ugo+x ${ONLINE_BINDIR}/* \
&& ln -s ${ONLINE_BINDIR}/request_new_tab.sh ${ONLINE_BINDIR}/request_new_tab

# copy online-specific files into medley/library
COPY --chown=${USER_NAME}:${USER_NAME} library/ONLINEUTILS ${MEDLEY_INSTALLDIR}/library
COPY --chown=${USER_NAME}:${USER_NAME} library/ONLINEUTILS.LCOM ${MEDLEY_INSTALLDIR}/library

# copy INIT file into home directory
COPY --chown=${USER_NAME}:${USER_NAME} init/INIT ${MEDLEY_USERDIR}
Expand All @@ -140,6 +147,11 @@ RUN mkdir -p /etc/letsencrypt/live/online.interlisp.org/ \
&& mkdir -p /etc/letsencrypt/archive/online.interlisp.org/ \
&& chmod go-rwx /etc/letsencrypt/archive

# For web files directory - copied there in run-online-medley script
RUN mkdir -p ${OIO_INSTALLDIR}/misc \
&& chown root:root ${OIO_INSTALLDIR}/misc
COPY --chown=root:root misc/test.html ${OIO_INSTALLDIR}/misc

# In actual use, USER and ENTRYPOINT will be set by the docker run command
WORKDIR ${HOMEDIR}
USER root:root
Expand Down
33 changes: 22 additions & 11 deletions docker_medley/init/ONLINE-INIT
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "18-Mar-2025 22:45:51" {DSK}<home>medley>il>ONLINE-INIT.;1 10668
(FILECREATED "18-Nov-2025 23:19:56" {DSK}<home>frank>il>online>docker_medley>init>ONLINE-INIT.;51 10938

:EDIT-BY "guest"
:EDIT-BY "FGH"

:PREVIOUS-DATE "17-Mar-2025 17:06:18" {DSK}<home>medley>il>ONLINE-INIT.;1)
:CHANGES-TO (VARS ONLINE-INITCOMS)

:PREVIOUS-DATE "29-Oct-2025 23:56:02"
{DSK}<home>frank>il>online>docker_medley>init>ONLINE-INIT.;50)


(PRETTYCOMPRINT ONLINE-INITCOMS)
Expand All @@ -14,6 +17,8 @@
APPS-INIT)
(FILES (SYSLOAD)
VTCHAT)
(FILES (SYSLOAD)
ONLINEUTILS)
(GLOBALVARS Online.LogoutTimeout Online.SftpPort Online.SftpPassword Online.SftpDisplay
IDLE.PROFILE IDLE.BOUNCING.BOX Online.SftpDisplayMenu ONLINEP ShellBrowser ShellOpener
CLHS.OPENER MEDLEYDIR)
Expand All @@ -30,6 +35,9 @@

(FILESLOAD (SYSLOAD)
VTCHAT)

(FILESLOAD (SYSLOAD)
ONLINEUTILS)
(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS Online.LogoutTimeout Online.SftpPort Online.SftpPassword Online.SftpDisplay IDLE.PROFILE
Expand Down Expand Up @@ -149,6 +157,8 @@
(Online.DoInit
[LAMBDA NIL

(* ;; "Edited 29-Oct-2025 23:55 by FGH")

(* ;; "Edited 16-Mar-2025 23:26 by guest")

(* ;; "Edited 25-Feb-2024 11:37 by fgh")
Expand Down Expand Up @@ -217,14 +227,15 @@
(RPLACA (CAR CHAT.DISPLAYTYPES)
NIL)

(* ;;
 "Setup NOTECARDSDIRECTORIES. Should be done it APPS-INIT. But until thats done, we'll do it here.")
(* ;; "Create File Import/Export Button")

(Online.SetUpNOTECARDSDIRECTORIES)
(Online.FileButton)

(* ;; "Create File Import/Export Button")
(* ;; "If there is a start-script file, load it ")

(Online.FileButton])
(LET [(START-SCRIPT (UNIX-GETENV 'START_SCRIPT]
(IF START-SCRIPT
THEN (LOAD START-SCRIPT])

(ONLINEP
[LAMBDA NIL (* ; "Edited 24-Feb-2024 22:31 by fgh")
Expand All @@ -239,7 +250,7 @@
(BKSYSBUF " ")
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1640 10532 (Online.SftpInitInfo 1650 . 2523) (Online.SftpUpdateInfo 2525 . 2780) (
Online.SetUpNOTECARDSDIRECTORIES 2782 . 4490) (Online.FileButton 4492 . 7320) (Online.DoInit 7322 .
10393) (ONLINEP 10395 . 10530)))))
(FILEMAP (NIL (1828 10802 (Online.SftpInitInfo 1838 . 2711) (Online.SftpUpdateInfo 2713 . 2968) (
Online.SetUpNOTECARDSDIRECTORIES 2970 . 4678) (Online.FileButton 4680 . 7508) (Online.DoInit 7510 .
10663) (ONLINEP 10665 . 10800)))))
STOP
Binary file modified docker_medley/init/ONLINE-INIT.LCOM
100755 → 100644
Binary file not shown.
77 changes: 77 additions & 0 deletions docker_medley/library/ONLINEUTILS
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)

(FILECREATED "13-Dec-2025 22:45:29" {DSK}<home>medley>il>medley>library>ONLINEUTILS.;1 3336

:EDIT-BY "fgh"

:CHANGES-TO (VARS ONLINEUTILSCOMS)
(FNS Online.WebfileURL Online.OpenWebfile)

:PREVIOUS-DATE "18-Nov-2025 22:54:33" {DSK}<usr>local>interlisp>medley>library>ONLINEUTILS.;1
)


(PRETTYCOMPRINT ONLINEUTILSCOMS)

(RPAQQ ONLINEUTILSCOMS [(FILES PSEUDOHOSTS)
(FNS ShellHttpGet Online.WebfileURL Online.OpenWebfile)
(P (PSEUDOHOST 'WEBFILES (CONCAT LOGINDIR "/webfiles"])

(FILESLOAD PSEUDOHOSTS)
(DEFINEQ

(ShellHttpGet
[LAMBDA (URL OUTFILENAME) (* ; "Edited 18-Nov-2025 22:54 by FGH")

(* ;; "Download a file specified by URL from the internet and place it in anew file name OUTFILENAME. OUTFILENAME will be versioned if it is on a versioned file device. Protocol of URL must be http: or https:. Uses wget (if it exists) or curl (if it exists) via a ShellCommand. It is an error if the underlying system doesn't have either wget or curl.")
 (* ; "Edited 18-Nov-2025 22:39 by FGH")
(LET ((UURL (U-CASE URL)))
(if (NOT (OR (STRPOS "HTTP:://" UURL NIL NIL T)
(STRPOS "HTTPS://" UURL NIL NIL T)))
then (ERROR "ShellHttpGet URL argument is not a HTTP:// or HTTPS:// Url")))
(LET* ((WGET (ShellWhich "wget"))
(CURL (if (NULL WGET)
then (ShellWhich "curl")
else NIL))
(OUTNAME (OUTFILEP OUTFILENAME))
(TMPFILE (CONCAT "/tmp/wget" (CLOCK)))
(UNIXFILE (CONCAT "{UNIX}" TMPFILE))
(CMD (if WGET
then (CONCAT WGET " " URL " -O " TMPFILE)
elseif CURL
then (CONCAT CURL " " URL " --output " TMPFILE)
else NIL)))
(if (NULL CMD)
then (ERROR "ShellHttpGet - neither wget nor curl are available on this system"))
(ShellCommand CMD)
(COPYFILE UNIXFILE OUTNAME)
(DELFILE UNIXFILE)
OUTNAME])

(Online.WebfileURL
[LAMBDA (WebFilePath) (* ; "Edited 13-Dec-2025 22:40 by fgh")

(* ;; "Return the URL that will acess a webfile using the OIO https server")

(* ;; "WebfilePath is the path for the file below {WEBFILES}")
 (* ; "Edited 13-Dec-2025 21:59 by fgh")
(CONCAT "https://online.interlisp.org:" (UNIX-GETENV "OIO_WEBFILES_PORT")
"/" WebFilePath])

(Online.OpenWebfile
[LAMBDA (WebFilePath) (* ; "Edited 13-Dec-2025 22:44 by fgh")

(* ;; "Open a Webfile in a browser using the Online HTTPS server to access the file in the Medley file system.")

(* ;; " Webfiles are always tored in {WEBFILES}")

(* ;; " WebfilePath is the path to the file below {WEBFILES}")

(ShellOpen (Online.WebfileURL WebFilePath])
)

(PSEUDOHOST 'WEBFILES (CONCAT LOGINDIR "/webfiles"))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (671 3259 (ShellHttpGet 681 . 2310) (Online.WebfileURL 2312 . 2817) (Online.OpenWebfile
2819 . 3257)))))
STOP
Binary file added docker_medley/library/ONLINEUTILS.LCOM
Binary file not shown.
45 changes: 45 additions & 0 deletions docker_medley/misc/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
<style>
/* Simple styling */
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 20px;
}
h1 {
color: #333;
}
p {
color: #555;
}
a {
color: #007BFF;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>

<h1>Welcome to My First HTML Page</h1>
<p>This is a simple example of an HTML page with some basic styling.</p>

<h2>Features:</h2>
<ul>
<li>Headings</li>
<li>Paragraphs</li>
<li>Lists</li>
<li>Links</li>
</ul>

<p>Visit <a href="https://www.example.com" target="_blank">Example.com</a> for more info.</p>

</body>
</html>
38 changes: 38 additions & 0 deletions docker_medley/scripts/https.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
# Author: Sean Pesce
# Modified by Frank Halasz @ Interlisp.org 2025-12-12

# References:
# https://stackoverflow.com/questions/19705785/python-3-simple-https-server
# https://docs.python.org/3/library/ssl.html
# https://docs.python.org/3/library/http.server.html

# Shell command to create a self-signed TLS certificate and private key:
# openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out cert.crt -keyout private.key

import http.server
import ssl
import sys
import os

def serve(host, port, cert_fpath, privkey_fpath, dir):
os.chdir(dir)
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) # Might need to use ssl.PROTOCOL_TLS for older versions of Python
context.load_cert_chain(certfile=cert_fpath, keyfile=privkey_fpath, password='')
server_address = (host, port)
httpd = http.server.HTTPServer(server_address, http.server.SimpleHTTPRequestHandler)
httpd.socket = context.wrap_socket(httpd.socket, server_side=True)
httpd.serve_forever()


if __name__ == '__main__':
if len(sys.argv) < 4:
print(f'Usage:\n {sys.argv[0]} <port> <PEM certificate file> <private key file>')
sys.exit()

PORT = int(sys.argv[1])
CERT_FPATH = sys.argv[2]
PRIVKEY_FPATH = sys.argv[3]
DIR = sys.argv[4]

serve('0.0.0.0', PORT, CERT_FPATH, PRIVKEY_FPATH, DIR)
43 changes: 40 additions & 3 deletions docker_medley/scripts/run-online-medley
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
#
#set -x

TLS_CERT_FILE=/etc/letsencrypt/live/online.interlisp.org/fullchain.pem
TLS_KEY_FILE=/etc/letsencrypt/live/online.interlisp.org/privkey.pem

if [ -z "${NCO}" ]; then export NCO="false"; fi
if [ -z "${MEDLEY_EXEC}" ]; then export MEDLEY_EXEC="common"; fi

RELEASE_SYSOUT_PATH="${MEDLEY_INSTALLDIR}/loadups/apps.sysout"
CUSTOM_SYSOUT_PATH="${MEDLEY_USERDIR}/sysout/online.sysout"
RELEASE_INIT_PATH="${MEDLEY_INSTALLDIR}/greetfiles/ONLINE-INIT.LCOM"
Expand Down Expand Up @@ -67,6 +69,20 @@ if [ $# -gt 1 ] && [ "$2" = "custom" ]; then
fi
fi
#
unset START_SCRIPT
if [ -n "${START_SCRIPT_URL}" ]
then
export START_SCRIPT="${MEDLEY_USERDIR}/initdir/START-SCRIPT"
mkdir -p "$(dirname "${START_SCRIPT}")"
wget "${START_SCRIPT_URL}" -O "${START_SCRIPT}"
if [ $? -ne 0 ]
then
rm -f "${START_SCRIPT}"
unset START_SCRIPT
fi
fi
unset START_SCRIPT_URL
#
if [ $# -gt 2 ]; then
width=$3
else
Expand Down Expand Up @@ -132,8 +148,8 @@ export FILEBROWSER_DATABASE=/usr/local/filebrowser/filebrowser.db
export FILEBROWSER_PORT=3${PORT}
if [ ${SUPPORT_HTTPS} = "yes" ];
then
export FILEBROWSER_CERT="--cert /etc/letsencrypt/live/online.interlisp.org/fullchain.pem"
export FILEBROWSER_KEY="--key /etc/letsencrypt/live/online.interlisp.org/privkey.pem"
export FILEBROWSER_CERT="--cert ${TLS_CERT_FILE}"
export FILEBROWSER_KEY="--key ${TLS_KEY_FILE}"
else
export FILEBROWSER_CERT=""
export FILEBROWSER_KEY=""
Expand All @@ -144,6 +160,27 @@ fi
${FILEBROWSER_CERT} ${FILEBROWSER_KEY} &
export OIO_FB_URL="${OIO_FB_URL}:${FILEBROWSER_PORT}/files/il?u=${MEDLEY_UNAME}&p=${SFTP_PWD}"
#
# Start http server
#
# need to create WEBDIR here (if needed) and not in Dockerfile_medley since file system might be remaining
# from before WEBDIR was intrduced
if [ ! -e "${MEDLEY_WEBDIR}" ]
then
mkdir -p "${MEDLEY_WEBDIR}"
chown ${MEDLEY_UNAME}:medley "${MEDLEY_WEBDIR}"
cp -rp "${OIO_INSTALLDIR}"/misc/test.html "${MEDLEY_WEBDIR}"
chown ${MEDLEY_UNAME}:medley "${MEDLEY_WEBDIR}"/test.html
fi
HTTP_PORT=4${PORT}
if [ ${SUPPORT_HTTPS} = "yes" ]
then
"${OIO_INSTALLDIR}"/bin/https.py \
"${HTTP_PORT}" "${TLS_CERT_FILE}" "${TLS_KEY_FILE}" "${MEDLEY_WEBDIR}" &
else
/usr/bin/python3 -m http.server ${HTTP_PORT} -d "${MEDLEY_WEBDIR}" &
fi
export OIO_WEBFILES_PORT=${HTTP_PORT}
#
#
#
su ${MEDLEY_UNAME} <<EOF
Expand Down
Loading