When restarting the container, `Xvfb` is killed quite rudely, so it doesn't have time to clean up the lock. This means that on subsequent starts (without recreating the container), `Xvfb` refuses to start and thus the WebView fails.
* C: handler for abort
CEF will kill the thread if the GPU process cannot be created. This
brings down Suwayomi with it, so instead just kill the thread and inform
Java about the exception.
* Two-stage build to download an build catch_abort
Building JNI extensions requires JDK, but we don't need it at runtime,
so create a build-step based on JDK, then copy the built binary over
* Add catch handler to github action
* Add `LD_PRELOAD` to startup script
Closes#131
* Script to download and extract a JCEF release
Closely mirrors what KCEF does, but written in glorious AWK
* Call kcef_download and link downloaded JCEF where Suwayomi expects it
The script downloads JCEF into /opt. Link this folder at runtime into
the data folder where Suwayomi expects it. This allows us to easily
bundle the predownloaded release without modifying Suwayomi startup.
Move `LD_PRELOAD` down a bit to avoid warnings about preloading
libcef.so before the symlink exists.
* Add KCEF url to workflow to embed JCEF into container
* Support KCEF
Install native dependencies required by JCEF
Sets up JNI libraries as required by the browser process
Launch Suwayomi in a XVFB environment to fake X11
* Copy libraries to home folder instead
Otherwise, other architectures are not supported
Search path is :
[/usr/java/packages/lib/libnativewindow_awt.so, /usr/lib64/libnativewindow_awt.so, /usr/lib64/libnativewindow_awt.so, /usr/lib/libnativewindow_awt.so, /usr/lib/libnativewindow_awt.so, /home/suwayomi/libnativewindow_awt.so, /home/suwayomi/natives/linux-amd64/libnativewindow_awt.so]
* Overwrite config settings with comments correctly
Comments were either removed or broke the setting value due to incorrect formatting
* Fix "webUIEnabled" env var name
* Delete container only after receiving its logs
Due to the "-rm" option when starting the container, it was immediately deleted after it was stopped.
This prevented the workflow from getting the containers logs since it didn't exist anymore at this point of time and instead an error was raised
* Print container logs in case of failure
* Add a workflow step to test the container with passing env vars
* Overwrite server.conf settings only for provided env vars
Currently on every start the whole server.conf file gets replaced which causes any changed settings during runtime to get lost
* Fix readme formatting
* Add "webUIEnabled" env variable
This is the only setting that can not be changed via the UI
* Remove default values from readme
If we explicitly set the user.home property, then Java doesn't consult
/etc/passwd to determine $HOME, fixing the problems that necessitated
updating /etc/passwd in the first place.
Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>
Because we use the Java user.home property to get the default
configuration directory, there needs to be an entry for the correct user
in /etc/passwd. For this to work with arbitrary UID/GID, that means
updating /etc/shadow dynamically based on the UID/GID in the container
before starting the application.
Signed-off-by: Chance Zibolski <chance.zibolski@gmail.com>