Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


DMS - teedy.io



  • Actually I realized, I'm using another Dockerfile:

    FROM sismics/ubuntu-jetty:9.4.12
    MAINTAINER b.gamard@sismics.com
    
    RUN apt-get update && apt-get -y -q install ffmpeg mediainfo tesseract-ocr tesseract-ocr-fra tesseract-ocr-ita tesseract-ocr-kor tesseract-ocr-rus tesseract-ocr-ukr tesseract-ocr-spa tesseract-ocr-ara tesseract-ocr-hin tesseract-ocr-deu tesseract-ocr-pol tesseract-ocr-jpn tesseract-ocr-por tesseract-ocr-tha tesseract-ocr-jpn tesseract-ocr-chi-sim tesseract-ocr-chi-tra tesseract-ocr-nld tesseract-ocr-tur tesseract-ocr-heb tesseract-ocr-hun && \
        apt-get clean && rm -rf /var/lib/apt/lists/*
    
    # Remove the embedded javax.mail jar from Jetty
    RUN rm -f /opt/jetty/lib/mail/javax.mail.glassfish-*.jar
    
    ADD docs.xml /opt/jetty/webapps/docs.xml
    ADD docs-web/target/docs-web-*.war /opt/jetty/webapps/docs.war
    
    EXPOSE 80
    

    I added the EXPOSE 80 at the end.



  • Ok so I realized the app is listening on 8080, so I changed the EXPOSE in my docker file 8080 and updated that in my CloudronManifest.json as well.

    Here are some of the logs from docs:

    Jul 21 21:05:29 box:shell reload spawn: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/reloadnginx.sh
    Jul 21 21:05:29 box:shell reload (stdout): nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/applications/1ad8de27-5af8-4a6b-8009-894d67480ca6.conf:32
    Jul 21 21:05:29 box:shell reload (stdout): nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/applications/6c952513-f9e1-4518-b775-ed6e27828aee.conf:32
    Jul 21 21:05:29 box:shell reload (stdout): nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/applications/a5bd18fe-5f58-4933-bb02-fa81b16c2403.conf:32
    Jul 21 21:05:29 box:shell reload (stdout): nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx/applications/c55a8d0e-bad9-4a9b-bdde-2c516260b4cb.conf:32
    Jul 21 21:05:29 box:tasks 1024: {"percent":100,"message":"Done"}
    Jul 21 21:05:29 box:apptask docs.rileyscloud.net updating app with values: {"installationState":"installed","error":null,"health":null}
    Jul 21 21:05:29 box:tasks setCompleted - 1024: {"result":null,"error":null}
    Jul 21 21:05:29 box:tasks 1024: {"percent":100,"result":null,"error":null}
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:579)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:240)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
    Jul 21 21:05:33 at org.eclipse.jetty.server.Server.start(Server.java:416)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
    Jul 21 21:05:33 at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    Jul 21 21:05:33 at org.eclipse.jetty.server.Server.doStart(Server.java:383)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1572)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
    Jul 21 21:05:33 at java.base/java.security.AccessController.doPrivileged(Native Method)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Jul 21 21:05:33 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.start(Main.java:486)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.main(Main.java:77)
    Jul 21 21:05:33 Caused by:
    Jul 21 21:05:33 java.nio.file.FileSystemException: /data: Read-only file system
    Jul 21 21:05:33 at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
    Jul 21 21:05:33 at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    Jul 21 21:05:33 at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
    Jul 21 21:05:33 at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:385)
    Jul 21 21:05:33 at java.base/java.nio.file.Files.createDirectory(Files.java:689)
    Jul 21 21:05:33 at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:796)
    Jul 21 21:05:33 at java.base/java.nio.file.Files.createDirectories(Files.java:782)
    Jul 21 21:05:33 at com.sismics.docs.core.util.DirectoryUtil.getBaseDataDirectory(DirectoryUtil.java:44)
    Jul 21 21:05:33 at com.sismics.docs.core.util.DirectoryUtil.getDataSubDirectory(DirectoryUtil.java:104)
    Jul 21 21:05:33 at com.sismics.docs.core.util.DirectoryUtil.getLogDirectory(DirectoryUtil.java:86)
    Jul 21 21:05:33 at com.sismics.util.filter.RequestContextFilter.init(RequestContextFilter.java:53)
    Jul 21 21:05:33 at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)
    Jul 21 21:05:33 at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:741)
    Jul 21 21:05:33 at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:374)
    Jul 21 21:05:33 at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
    Jul 21 21:05:33 at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
    Jul 21 21:05:33 at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)
    Jul 21 21:05:33 at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
    Jul 21 21:05:33 at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:505)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:453)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
    Jul 21 21:05:33 at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
    Jul 21 21:05:33 at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
    Jul 21 21:05:33 at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
    Jul 21 21:05:33 at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:579)
    Jul 21 21:05:33 at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:240)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
    Jul 21 21:05:33 at org.eclipse.jetty.server.Server.start(Server.java:416)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
    Jul 21 21:05:33 at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
    Jul 21 21:05:33 at org.eclipse.jetty.server.Server.doStart(Server.java:383)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1572)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
    Jul 21 21:05:33 at java.base/java.security.AccessController.doPrivileged(Native Method)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Jul 21 21:05:33 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.start(Main.java:486)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.main(Main.java:77)
    Jul 21 21:05:33 2020-07-22 03:05:33.976:INFO:oejs.AbstractConnector:main: Started ServerConnector@55259aa7{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
    Jul 21 21:05:33 2020-07-22 03:05:33.977:INFO:oejs.Server:main: Started @5275ms
    Jul 21 21:05:33 2020-07-22 03:05:33.977:WARN:oejuc.FileNoticeLifeCycleListener:main:
    Jul 21 21:05:33 java.io.FileNotFoundException: /opt/jetty/jetty.state (Read-only file system)
    Jul 21 21:05:33 at java.base/java.io.FileOutputStream.open0(Native Method)
    Jul 21 21:05:33 at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
    Jul 21 21:05:33 at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
    Jul 21 21:05:33 at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:158)
    Jul 21 21:05:33 at java.base/java.io.FileWriter.<init>(FileWriter.java:82)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.FileNoticeLifeCycleListener.writeState(FileNoticeLifeCycleListener.java:45)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.FileNoticeLifeCycleListener.lifeCycleStarted(FileNoticeLifeCycleListener.java:64)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarted(AbstractLifeCycle.java:179)
    Jul 21 21:05:33 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1572)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
    Jul 21 21:05:33 at java.base/java.security.AccessController.doPrivileged(Native Method)
    Jul 21 21:05:33 at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    Jul 21 21:05:33 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    Jul 21 21:05:33 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.start(Main.java:486)
    Jul 21 21:05:33 at org.eclipse.jetty.start.Main.main(Main.java:77)
    

    Let me know if you see something I'm missing.


  • Staff

    @webmin88 said in DMS - teedy.io:

    Jul 21 21:05:33 java.nio.file.FileSystemException: /data: Read-only file system

    @webmin88 It's failing because of the above error and not the expose. Only /app/data is writable on Cloudron containers.



  • @girish

    Ok so what do I need to add to my Dockerfile?

    VOLUME /app/data:/data ?

    Thanks


  • Staff

    @webmin88 In the CloudronManifest.json, first make sure you have the localstorage addon -https://cloudron.io/documentation/custom-apps/addons/#localstorage . After that, you have to investigate why the app is writing to /data ? This seems to be some configurable directory coming from somewhere (I don't know the app, so it's hard to guess). Usually you have to adjust some config file or env variable to tell the app to write to /app/data instead.



  • Thanks @girish I found the setting, changed it and I can finally install the app on Cloudron. Now I only have 1 thing left to solve, which I've captured a screenshot of below. Whenever I go to docs.mydomain.com, I get this Directory listing, and in order to open my app, I have to select the src/ folder.

    docs_snip.PNG

    Is Cloudron expecting the application to be served from another directory? The following is my Dockerfile:

    FROM sismics/ubuntu-jetty:9.4.12
    MAINTAINER b.gamard@sismics.com
    
    RUN apt-get update && apt-get -y -q install ffmpeg mediainfo tesseract-ocr tesseract-ocr-fra tesseract-ocr-ita tesseract-ocr-kor tesseract-ocr-rus tesseract-ocr-ukr tesseract-ocr-spa tesseract-ocr-ara tesseract-ocr-hin tesseract-ocr-deu tesseract-ocr-pol tesseract-ocr-jpn tesseract-ocr-por tesseract-ocr-tha tesseract-ocr-jpn tesseract-ocr-chi-sim tesseract-ocr-chi-tra tesseract-ocr-nld tesseract-ocr-tur tesseract-ocr-heb tesseract-ocr-hun && \
        apt-get clean && rm -rf /var/lib/apt/lists/*
    
    # Remove the embedded javax.mail jar from Jetty
    RUN rm -f /opt/jetty/lib/mail/javax.mail.glassfish-*.jar
    
    ADD docs.xml /opt/jetty/webapps/docs.xml
    ADD docs-web/target/docs-web-*.war /opt/jetty/webapps/docs.war
    
    EXPOSE 8080
    

    I feel like maybe I'm supposed to be adding that docs.xml and .war file to another specific directory? Any help you can provide is super appreciated, you guys have already helped me loads and I appreciate every bit of it.



  • I noticed another issue that maybe you can help me solve. I noticed that if I restart my app from Cloudron, all the settings and data is reset, so I could use some help understanding how to make my settings and data persistent.

    Thanks again for all your help.



  • @webmin88 do you have a repo that you can share?



  • I have the author's source: https://github.com/sismics/docs/tree/v1.8

    The only things I've changed from v1.8 is I've modified the doc.xml in the root of the repo to set the data drive, and I've compiled a war file using the mvn clean -DskipTests install which creates a .war file under docs-web/target.



  • I'm also interested in an integration in the App Store.



  • I started to package this. The issue is there is no support for LDAP and as far as I can see there is no way to apply mail settings automatically.

    It is working if you install manually, I have not done extensive testing on it yet but it is a start.

    The repo is here.


Log in to reply