WebApp - peteschaefer/jose GitHub Wiki
jose, the Web App
Let's you run a jose database in the network and view games using an Internet browser.
Note that the Web App is far from being a full-fledged application. You can view games, upload files, and that's about it. It's not quite a competitor for LiChess ;)
The Web App is, in the first place, a showcase for the easy integration of Web technology into the jose framework. You may, for instance, use the jose Desktop App to manage files, set up lot's of style info, then publish the data to the web using the jose Web App.
See also https://peteschaefer.github.io/jose/servlet.html with some ancient screen shots.
Setting up the Web App
Using a Docker Container
is the easiest way to get the jose WebApp running
- get the Dockerfile from https://github.com/peteschaefer/jose/raw/refs/heads/main/web/Dockerfile
- the Dockerfile is based on a pretty straightforward AWS Linux installation.
- if you need to run it on different platform, you probably have to do some editing
- create an image using your preferred container software (like docker, podman,...)
- start the image. Make sure to expose port 8080 for the Web server
Pushing the image to the Cloud
- see your Cloud providers instructions
- here are, e.g., the instructions for AWS: https://docs.aws.amazon.com/AmazonECR/latest/userguide/Podman.html
- setting up all the AWS stuff is a bit of work, but instructive, you need to:
- create an image with docker (or podman)
- upload it to AWS container registry
- set up an Cloud cluster and service that uses the uploaded image
- don't forget to expose port 8080 in the image, and in the Security Group
- if all is set and done, you have a jose Database in the cloud; like this.
Deploying a WAR file
alternatively, you can do it the old-school way by deploying the file jose.war
to an Jakarta EE server.
The docker image, above, comes with Tomcat, but there are some more.
- get war file from https://github.com/peteschaefer/jose/releases/download/Latest/jose.war
Usually ... a *.war
is meant to be a self-contained thingy. Not so in this case.
In addition, you need an installation of the jose Desktop App. A few bits of information need to be passed through environment variables, like so:
export jose_workdir=... # path to the jose Desktop folder, e.g. C:\Program Files\jose, or whichever place you chose>
export jose_db=MySQL-standalone # this is the very same database that powers the Desktop App, too
export jose_db_port=3306 # database port number; useful for connecting from the outside
export jose_splash=off # tells the Web App that's it is "headless"
Then just drop in the WAR-File:
cp jose.war .../apache-tomcat/webapps
../apache-tomcat/bin/catalina.sh run&
- just follow the instruction in the docker file, and adjust them for your needs
Testing
See that everything is running by directing your browser to https://localhost:8080/jose
Some diagnostic info can be found on https://localhost:8080/jose/snoop.jsp
Use the Upload
button to copy data into the database. Then refresh localhost:8080/jose
.
Connecting to a different database
By default, the Web App uses the same embedded database that is behind the Desktop App. If you instead prefer to run your own database server, you are free to do so. See Database Setup for more.