docker version stuff
This commit is contained in:
parent
d850d026ed
commit
b58fd2022a
15 changed files with 28 additions and 21 deletions
2
.github/workflows/push-docker.yml
vendored
2
.github/workflows/push-docker.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
|||
|
||||
- uses: gradle/gradle-build-action@v2.4.2
|
||||
env:
|
||||
ENABLE_SECURITY: false
|
||||
DOCKER_ENABLE_SECURITY: false
|
||||
with:
|
||||
gradle-version: 7.6
|
||||
arguments: clean build
|
||||
|
|
2
.github/workflows/releaseArtifacts.yml
vendored
2
.github/workflows/releaseArtifacts.yml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
|||
- name: Generate jar (With Security=${{ matrix.enable_security }})
|
||||
run: ./gradlew clean createExe
|
||||
env:
|
||||
ENABLE_SECURITY: ${{ matrix.enable_security }}
|
||||
DOCKER_ENABLE_SECURITY: ${{ matrix.enable_security }}
|
||||
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
|
|
|
@ -4,7 +4,7 @@ FROM frooodle/stirling-pdf-base:beta4
|
|||
ARG VERSION_TAG
|
||||
ENV VERSION_TAG=$VERSION_TAG
|
||||
|
||||
ENV ENABLE_SECURITY=false
|
||||
ENV DOCKER_ENABLE_SECURITY=false
|
||||
|
||||
# Create scripts folder and copy local scripts
|
||||
RUN mkdir /scripts
|
||||
|
|
|
@ -20,7 +20,7 @@ EXPOSE 8080
|
|||
|
||||
# Set environment variables
|
||||
ENV GROUPS_TO_REMOVE=Python,OpenCV,OCRmyPDF
|
||||
ENV ENABLE_SECURITY=false
|
||||
ENV DOCKER_ENABLE_SECURITY=false
|
||||
|
||||
# Run the application
|
||||
CMD ["java", "-jar", "/app.jar"]
|
||||
|
|
|
@ -11,7 +11,7 @@ EXPOSE 8080
|
|||
|
||||
# Set environment variables
|
||||
ENV GROUPS_TO_REMOVE=CLI
|
||||
ENV ENABLE_SECURITY=false
|
||||
ENV DOCKER_ENABLE_SECURITY=false
|
||||
|
||||
# Run the application
|
||||
CMD ["java", "-jar", "/app.jar"]
|
||||
|
|
|
@ -18,7 +18,7 @@ repositories {
|
|||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
if (System.getenv('ENABLE_SECURITY') == 'false') {
|
||||
if (System.getenv('DOCKER_ENABLE_SECURITY') == 'false') {
|
||||
exclude 'stirling/software/SPDF/config/security/**'
|
||||
exclude 'stirling/software/SPDF/controller/api/UserController.java'
|
||||
exclude 'stirling/software/SPDF/controller/web/AccountWebController.java'
|
||||
|
@ -67,7 +67,7 @@ dependencies {
|
|||
implementation 'org.springframework.boot:spring-boot-starter-web:3.1.2'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:3.1.2'
|
||||
|
||||
if (System.getenv('ENABLE_SECURITY') != 'false') {
|
||||
if (System.getenv('DOCKER_ENABLE_SECURITY') != 'false') {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-security:3.1.2'
|
||||
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.1.2.RELEASE'
|
||||
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
|
||||
|
|
|
@ -16,8 +16,8 @@ if [[ -n "$TESSERACT_LANGS" ]]; then
|
|||
done
|
||||
fi
|
||||
|
||||
# Check for ENABLE_SECURITY and download the appropriate JAR if required
|
||||
if [ "$ENABLE_SECURITY" = "true" ] && [ "$VERSION_TAG" != "alpha" ]; then
|
||||
# Check for DOCKER_ENABLE_SECURITY and download the appropriate JAR if required
|
||||
if [ "$DOCKER_ENABLE_SECURITY" = "true" ] && [ "$VERSION_TAG" != "alpha" ]; then
|
||||
echo "Downloading from: https://github.com/Frooodle/Stirling-PDF/releases/download/$VERSION_TAG/Stirling-PDF-with-login.jar"
|
||||
curl -L -o new-app.jar https://github.com/Frooodle/Stirling-PDF/releases/download/$VERSION_TAG/Stirling-PDF-with-login.jar
|
||||
if [ $? -eq 0 ]; then # checks if curl was successful
|
||||
|
|
|
@ -19,7 +19,7 @@ function setMode(mode) {
|
|||
elements.lightModeStyles.disabled = mode !== "off";
|
||||
elements.darkModeStyles.disabled = mode !== "on";
|
||||
elements.rainbowModeStyles.disabled = mode !== "rainbow";
|
||||
|
||||
var jumbotron = document.getElementById('jumbotron');
|
||||
if (mode === "on") {
|
||||
elements.darkModeIcon.src = "moon.svg";
|
||||
// Add the table-dark class to tables for dark mode
|
||||
|
@ -27,6 +27,10 @@ function setMode(mode) {
|
|||
tables.forEach(table => {
|
||||
table.classList.add('table-dark');
|
||||
});
|
||||
if(jumbotron) {
|
||||
jumbotron.classList.add('bg-dark');
|
||||
jumbotron.classList.remove('bg-light');
|
||||
}
|
||||
} else if (mode === "off") {
|
||||
elements.darkModeIcon.src = "sun.svg";
|
||||
// Remove the table-dark class for light mode
|
||||
|
@ -34,6 +38,11 @@ function setMode(mode) {
|
|||
tables.forEach(table => {
|
||||
table.classList.remove('table-dark');
|
||||
});
|
||||
if(jumbotron){
|
||||
console.log(mode)
|
||||
jumbotron.classList.remove('bg-dark');
|
||||
jumbotron.classList.add('bg-light');
|
||||
}
|
||||
} else if (mode === "rainbow") {
|
||||
elements.darkModeIcon.src = "rainbow.svg";
|
||||
}
|
||||
|
|
|
@ -51,8 +51,6 @@
|
|||
<script src="js/tab-container.js"></script>
|
||||
|
||||
|
||||
<script src="js/darkmode.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<th:block th:fragment="game">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
const currentVersion = /*[[${@appVersion}]]*/ '';
|
||||
const noFavourites = /*[[#{noFavourites}]]*/ '';
|
||||
</script>
|
||||
<script th:src="@{/js/githubVersion.js}"></script>
|
||||
<script th:src="@{js/githubVersion.js}"></script>
|
||||
|
||||
<link rel="stylesheet" href="css/navbar.css">
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<div id="content-wrap">
|
||||
<div th:insert="~{fragments/navbar.html :: navbar}"></div>
|
||||
<!-- Jumbotron -->
|
||||
<div class="jumbotron jumbotron-fluid d-none d-md-block" id="jumbotron">
|
||||
<div class="bg-light p-5 rounded d-none d-md-block" id="jumbotron">
|
||||
<div class="container">
|
||||
<h1 class="display-4" th:text="${@appName}"></h1>
|
||||
<p class="lead" th:text="${@homeText != 'null' and @homeText != null and @homeText != ''} ? ${@homeText} : #{home.desc}"></p>
|
||||
|
|
|
@ -59,17 +59,17 @@ body {
|
|||
<div th:if="${logoutMessage}" class="alert alert-success"
|
||||
th:text="${logoutMessage}"></div>
|
||||
|
||||
<form th:action="@{/login}" method="post">
|
||||
<form th:action="@{login}" method="post">
|
||||
<img class="mb-4" src="favicon.svg" alt="" width="144" height="144">
|
||||
<h1 class="h1 mb-3 fw-normal">Stirling-PDF</h1>
|
||||
<h2 class="h5 mb-3 fw-normal">Please sign in</h2>
|
||||
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" id="username"
|
||||
<input type="text" class="form-control" id="username" name="username"
|
||||
placeholder="admin"> <label for="username">Username</label>
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
<input type="password" class="form-control" id="password"
|
||||
<input type="password" class="form-control" id="password" name="password"
|
||||
placeholder="Password"> <label for="password">Password</label>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="col-md-6">
|
||||
<h2 th:text="#{changeMetadata.header}"></h2>
|
||||
|
||||
<form method="post" id="form1" enctype="multipart/form-data" th:action="@{/update-metadata}">
|
||||
<form method="post" id="form1" enctype="multipart/form-data" th:action="@{update-metadata}">
|
||||
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
|
||||
<p class="text-muted" th:text="#{changeMetadata.selectText.1}"></p>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<h2 th:text="#{compress.header}"></h2>
|
||||
<form action="#" th:action="@{/compress-pdf}" method="post" enctype="multipart/form-data">
|
||||
<form action="#" th:action="@{compress-pdf}" method="post" enctype="multipart/form-data">
|
||||
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<h2 th:text="#{ocr.header}"></h2>
|
||||
<form th:if="${#lists.size(languages) > 0}" action="#" th:action="@{/ocr-pdf}" method="post" enctype="multipart/form-data" class="mb-3">
|
||||
<form th:if="${#lists.size(languages) > 0}" action="#" th:action="@{ocr-pdf}" method="post" enctype="multipart/form-data" class="mb-3">
|
||||
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
|
||||
<div class="mb-3">
|
||||
<label for="languages" class="form-label" th:text="#{ocr.selectText.1}"></label>
|
||||
|
|
Loading…
Reference in a new issue