Initial commit

This commit is contained in:
arbuilder
2021-09-10 00:43:54 +05:30
commit 304bcbd659
11 changed files with 1090 additions and 0 deletions

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@@ -0,0 +1,496 @@
name: Build Container Images
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
tachidesk_release_type:
required: false
default: 'stable'
description: 'Tachidesk Release Type'
publish_images_manually:
required: false
default: 'no'
description: 'Force Publish Images Manually'
env:
build_repo_docker: 'tachidesk'
build_base_image_alpine: 'alpine:3.13'
build_base_image_alpine_platform: 'linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x'
build_base_image_alpine_platform_testing: 'linux/amd64'
startup_script_url: 'https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/startup_script.sh'
tachidesk_webui_stable_url: 'https://api.github.com/repos/suwayomi/Tachidesk-Server/releases/latest'
tachidesk_webui_preview_url: 'https://api.github.com/repos/suwayomi/Tachidesk-Server-preview/releases/latest'
jobs:
check_workflow:
runs-on: ubuntu-latest
outputs:
enable_discord_hook: ${{ steps.run_job_steps.outputs.enable_discord_hook }}
enable_build_publish: ${{ steps.run_job_steps.outputs.enable_discord_hook }}
run_check_stable: ${{ steps.run_job_steps.outputs.run_check_stable }}
run_check_preview: ${{ steps.run_job_steps.outputs.run_check_preview }}
run_build_stable: ${{ steps.run_job_steps.outputs.run_build_stable }}
run_build_preview: ${{ steps.run_job_steps.outputs.run_build_preview }}
if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')"
steps:
- name: run job and steps check
id: run_job_steps
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
if [[ "${{ github.event.inputs.tachidesk_release_type }}" == "stable" ]]; then
if [[ "${{ github.actor }}" == "AriaMoradi" ]]; then
echo "::set-output name=run_check_stable::true"
echo "::set-output name=run_build_stable::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::true"
elif [[ "${{ github.actor }}" == "arbuilder" && "${{ github.repository_owner }}" == "arbuilder" ]]; then
echo "::set-output name=run_check_stable::true"
echo "::set-output name=run_build_stable::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::true"
elif [[ "${{ github.actor }}" == "arbuilder" && "${{ github.repository_owner }}" == "Suwayomi" && "${{ github.event.inputs.publish_images_manually }}" == "yes" ]]; then
echo "::set-output name=run_check_stable::true"
echo "::set-output name=run_build_stable::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::true"
elif [[ "${{ github.actor }}" == "arbuilder" && "${{ github.repository_owner }}" == "Suwayomi" && "${{ github.event.inputs.publish_images_manually }}" == "no" ]]; then
echo "::set-output name=run_check_stable::true"
echo "::set-output name=run_build_stable::true"
echo "::set-output name=enable_build_publish::false"
echo "::set-output name=enable_discord_hook::false"
elif [[ "${{ github.actor }}" != "arbuilder" && "${{ github.event.inputs.publish_images_manually }}" == "yes" ]]; then
echo "::set-output name=run_check_stable::true"
echo "::set-output name=run_build_stable::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::false"
else
echo "::set-output name=run_check_stable::false"
echo "::set-output name=run_build_stable::false"
echo "::set-output name=enable_build_publish::false"
echo "::set-output name=enable_discord_hook::false"
fi
fi
if [[ "${{ github.event.inputs.tachidesk_release_type }}" == "preview" ]]; then
if [[ "${{ github.actor }}" == "AriaMoradi" ]]; then
echo "::set-output name=run_check_preview::true"
echo "::set-output name=run_build_preview::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::true"
elif [[ "${{ github.actor }}" == "arbuilder" && "${{ github.repository_owner }}" == "arbuilder" ]]; then
echo "::set-output name=run_check_preview::true"
echo "::set-output name=run_build_preview::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::true"
elif [[ "${{ github.actor }}" == "arbuilder" && "${{ github.repository_owner }}" == "Suwayomi" && "${{ github.event.inputs.publish_images_manually }}" == "yes" ]]; then
echo "::set-output name=run_check_preview::true"
echo "::set-output name=run_build_preview::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::true"
elif [[ "${{ github.actor }}" == "arbuilder" && "${{ github.repository_owner }}" == "Suwayomi" && "${{ github.event.inputs.publish_images_manually }}" == "no" ]]; then
echo "::set-output name=run_check_preview::true"
echo "::set-output name=run_build_preview::true"
echo "::set-output name=enable_build_publish::false"
echo "::set-output name=enable_discord_hook::false"
elif [[ "${{ github.actor }}" != "arbuilder" && "${{ github.event.inputs.publish_images_manually }}" == "yes" ]]; then
echo "::set-output name=run_check_preview::true"
echo "::set-output name=run_build_preview::true"
echo "::set-output name=enable_build_publish::true"
echo "::set-output name=enable_discord_hook::false"
else
echo "::set-output name=run_check_preview::false"
echo "::set-output name=run_build_preview::false"
echo "::set-output name=enable_build_publish::false"
echo "::set-output name=enable_discord_hook::false"
fi
fi
elif [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "push" ]]; then
echo "::set-output name=run_check_stable::true"
echo "::set-output name=run_build_stable::false"
echo "::set-output name=run_check_preview::false"
echo "::set-output name=run_build_preview::false"
echo "::set-output name=enable_build_publish::false"
echo "::set-output name=enable_discord_hook::false"
else
echo "::set-output name=run_check_stable::false"
echo "::set-output name=run_build_stable::false"
echo "::set-output name=run_check_preview::false"
echo "::set-output name=run_build_preview::false"
echo "::set-output name=enable_build_publish::false"
echo "::set-output name=enable_discord_hook::false"
fi
check_stable:
needs: check_workflow
runs-on: ubuntu-latest
outputs:
new_release_check: ${{ steps.release_version_check.outputs.new_release_check }}
release_url: ${{ steps.get_latest_release_metadata.outputs.release_url }}
release_commit: ${{ steps.get_latest_release_metadata.outputs.release_commit }}
release_tag: ${{ steps.get_latest_release_metadata.outputs.release_tag }}
release_filename: ${{ steps.get_latest_release_metadata.outputs.release_filename }}
release_version: ${{ steps.get_latest_release_metadata.outputs.release_version }}
release_var: ${{ steps.get_latest_release_metadata.outputs.release_var }}
tachidesk_docker_git_commit: ${{ steps.get_latest_release_metadata.outputs.tachidesk_docker_git_commit }}
build_date: ${{ steps.get_latest_release_metadata.outputs.build_date }}
repository_owner_lower: ${{ steps.get_latest_release_metadata.outputs.repository_owner_lower }}
run_build_stable : ${{ needs.check_workflow.outputs.run_build_stable }}
enable_discord_hook: ${{ needs.check_workflow.outputs.enable_discord_hook }}
enable_build_publish: ${{ needs.check_workflow.outputs.enable_build_publish }}
if: needs.check_workflow.outputs.run_check_stable == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
path: main
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: get latest release metadata
id: get_latest_release_metadata
run: |
cd main
release_url=$(curl -s ${{ env.tachidesk_webui_stable_url }} | egrep -o "https://.*./releases/download.*.Tachidesk-Server.*.jar")
release_tag=$(curl -s ${{ env.tachidesk_webui_stable_url }} | egrep -o "tag_name.*.v[0-9]+.[0-9]+.[0-9]+" | egrep -o "v[0-9]+.[0-9]+.[0-9]+")
release_var=$(echo $release_url | egrep -o "Tachidesk-Server-$release_tag-r[0-9]+.jar" | egrep -o "$release_tag-r[0-9]+")
release_commit=$(echo $release_var | cut -f2 -d"r")
release_filename=Tachidesk-Server-${release_var}.jar
release_version=$(echo $release_tag | cut -c2-)
echo "::set-output name=release_url::$release_url"
echo "::set-output name=release_commit::$release_commit"
echo "::set-output name=release_tag::$release_tag"
echo "::set-output name=release_filename::$release_filename"
echo "::set-output name=release_version::$release_version"
echo "::set-output name=release_var::$release_var"
tachidesk_docker_git_commit=$(git rev-list --count HEAD)
echo "::set-output name=tachidesk_docker_git_commit::$tachidesk_docker_git_commit"
build_date=$(date "+%F")
echo "::set-output name=build_date::$build_date"
echo "::set-output name=repository_owner_lower::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')"
- name: Build and save stable alpine
id: docker_build_release_alpine
uses: docker/build-push-action@v2
with:
file: scripts/dockerfiles/Git_Actions-Dockerfile
platforms: ${{ env.build_base_image_alpine_platform_testing }}
build-args: |
BASE_IMAGE=${{ env.build_base_image_alpine }}
BUILD_DATE=${{ steps.get_latest_release_metadata.outputs.build_date }}
IMAGE_VERSION=${{ steps.get_latest_release_metadata.outputs.release_version }}
IMAGE_TYPE=stable-alpine
TACHIDESK_GIT_COMMIT=${{ steps.get_latest_release_metadata.outputs.release_commit }}
TACHIDESK_RELEASE_TAG=${{ steps.get_latest_release_metadata.outputs.release_tag }}
TACHIDESK_RELEASE_DOWNLOAD_URL=${{ steps.get_latest_release_metadata.outputs.release_url }}
TACHIDESK_FILENAME=${{ steps.get_latest_release_metadata.outputs.release_filename }}
STARTUP_SCRIPT_URL=${{ env.startup_script_url }}
TACHIDESK_DOCKER_GIT_COMMIT=${{ steps.get_latest_release_metadata.outputs.tachidesk_docker_git_commit }}
tags: |
test-image:stable
outputs: type=docker,dest=/tmp/test_image_stable.tar
- name: Docker Run Test Stable Image
id: docker_run_test_image_stable
run: |
docker load --input /tmp/test_image_stable.tar
mkdir -p /home/runner/work/_temp/tachidesk
chmod -R 777 /home/runner/work/_temp/tachidesk
docker run --rm -d -p 127.0.0.1:4568:4567 -v /home/runner/work/_temp/tachidesk:/home/suwayomi/.local/share/Tachidesk --name=test_image_stable test-image:stable
sleep 15
cat /home/runner/work/_temp/tachidesk/logfile.log
curl -s 127.0.0.1:4568/api/v1/settings/about/ && val=$(curl -s 127.0.0.1:4568/api/v1/settings/about/ | grep -o "Tachidesk" | sort --unique)
if [[ $val == "Tachidesk" ]]; then
echo ""
echo "Tachidesk stable run successfully"
echo "::set-output name=value::true"
docker stop test_image_stable
else
echo ""
echo "Tachidesk stable run Failed"
echo "::set-output name=value::false"
if [[ ${{ needs.check_workflow.outputs.enable_discord_hook }} == 'true' ]]; then
curl \
-F 'payload_json={"username": "Github", "content": "Docker Stable Image Dry Run Failed Version - ${{ steps.get_latest_release_metadata.outputs.release_tag }}"}' \
-F "file1=@/home/runner/work/_temp/tachidesk/logfile.log" \
"https://discord.com/api/webhooks/${{ secrets.DISCORD_TACHIDESK_WEBHOOK_ID }}/${{ secrets.DISCORD_TACHIDESK_TOKEN }}"
fi
exit 1
fi
- name: Delete docker files
run: |
rm -f /tmp/test_image_stable.tar
#rm -rf /home/runner/work/_temp/tachidesk
build_stable:
needs: check_stable
runs-on: ubuntu-latest
if: needs.check_stable.outputs.run_build_stable == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
path: main
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push stable alpine
id: docker_build_release_alpine
uses: docker/build-push-action@v2
with:
file: scripts/dockerfiles/Git_Actions-Dockerfile
platforms: ${{ env.build_base_image_alpine_platform }}
push: ${{ needs.check_stable.outputs.enable_build_publish == 'true' }}
build-args: |
BASE_IMAGE=${{ env.build_base_image_alpine }}
BUILD_DATE=${{ needs.check_stable.outputs.build_date }}
IMAGE_VERSION=${{ needs.check_stable.outputs.release_version }}
IMAGE_TYPE=stable-alpine
TACHIDESK_GIT_COMMIT=${{ needs.check_stable.outputs.release_commit }}
TACHIDESK_RELEASE_TAG=${{ needs.check_stable.outputs.release_tag }}
TACHIDESK_RELEASE_DOWNLOAD_URL=${{ needs.check_stable.outputs.release_url }}
TACHIDESK_FILENAME=${{ needs.check_stable.outputs.release_filename }}
STARTUP_SCRIPT_URL=${{ env.startup_script_url }}
TACHIDESK_DOCKER_GIT_COMMIT=${{ needs.check_stable.outputs.tachidesk_docker_git_commit }}
IMAGE_OWNER=${{ needs.check_stable.outputs.repository_owner_lower }}
tags: |
ghcr.io/${{ needs.check_stable.outputs.repository_owner_lower }}/${{ env.build_repo_docker }}:latest
ghcr.io/${{ needs.check_stable.outputs.repository_owner_lower }}/${{ env.build_repo_docker }}:${{ needs.check_stable.outputs.release_tag }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: save stable release
run: |
cd main
git pull
echo "`jq '.stable="${{ needs.check_stable.outputs.release_tag }}"' scripts/tachidesk_version.json`" > scripts/tachidesk_version.json
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git status
if [ -n "$(git status --porcelain)" ]; then
git pull
git add .
git commit -m "Update stable release version"
git push
else
echo "No changes to commit"
fi
- name: discord webhook stable
if: ${{ needs.check_stable.outputs.enable_discord_hook == 'true' }}
id: discord_webhook_stable
run: |
curl -H "Content-Type: application/json" -d '{"content": "Docker Stable Image Published!","embeds":[{"color":16729344,"author":{"name":"${{ github.repository_owner }}","icon_url":"https://avatars.githubusercontent.com/u/81182076","url":"https://github.com/${{ github.repository_owner }}"},"title":"Docker Stable Release","url":"https://github.com/${{ github.repository_owner }}/docker-tachidesk","fields":[{"name":"docker update","value":"docker pull ghcr.io/${{ needs.check_stable.outputs.repository_owner_lower }}/tachidesk","inline":false},{"name":"docker run","value":"docker run -p 4567:4567 ghcr.io/${{ needs.check_stable.outputs.repository_owner_lower }}/tachidesk","inline":false}],"thumbnail":{"url": "https://www.docker.com/sites/default/files/d8/2019-07/vertical-logo-monochromatic.png"},"description":"Tachidesk version - ${{ needs.check_stable.outputs.release_tag }}"}]}' "https://discord.com/api/webhooks/${{ secrets.DISCORD_TACHIDESK_WEBHOOK_ID }}/${{ secrets.DISCORD_TACHIDESK_TOKEN }}"
check_preview:
needs: check_workflow
runs-on: ubuntu-latest
outputs:
new_release_check: ${{ steps.release_version_check.outputs.new_release_check }}
release_url: ${{ steps.get_latest_release_metadata.outputs.release_url }}
release_commit: ${{ steps.get_latest_release_metadata.outputs.release_commit }}
release_tag: ${{ steps.get_latest_release_metadata.outputs.release_tag }}
release_filename: ${{ steps.get_latest_release_metadata.outputs.release_filename }}
release_version: ${{ steps.get_latest_release_metadata.outputs.release_version }}
release_var: ${{ steps.get_latest_release_metadata.outputs.release_var }}
tachidesk_docker_git_commit: ${{ steps.get_latest_release_metadata.outputs.tachidesk_docker_git_commit }}
build_date: ${{ steps.get_latest_release_metadata.outputs.build_date }}
repository_owner_lower: ${{ steps.get_latest_release_metadata.outputs.repository_owner_lower }}
run_build_preview : ${{ needs.check_workflow.outputs.run_build_preview }}
enable_discord_hook: ${{ needs.check_workflow.outputs.enable_discord_hook }}
enable_build_publish: ${{ needs.check_workflow.outputs.enable_build_publish }}
if: needs.check_workflow.outputs.run_check_preview == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
path: main
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: get latest release metadata
id: get_latest_release_metadata
run: |
cd main
release_url=$(curl -s ${{ env.tachidesk_webui_preview_url }} | egrep -o "https://.*./releases/download.*.Tachidesk-Server.*.jar")
release_tag=$(curl -s ${{ env.tachidesk_webui_preview_url }} | egrep -o "tag_name.*.v[0-9]+.[0-9]+.[0-9]+-r[0-9]+" | egrep -o "v[0-9]+.[0-9]+.[0-9]+-r[0-9]+")
release_var=$(echo $release_url | grep -o "Tachidesk-Server-$release_tag.jar" | grep -o "$release_tag" )
release_commit=$(echo $release_var | cut -f2 -d"r")
release_filename=Tachidesk-Server-${release_var}.jar
release_version=$(echo $release_tag | cut -c2-)
echo "::set-output name=release_url::$release_url"
echo "::set-output name=release_commit::$release_commit"
echo "::set-output name=release_tag::$release_tag"
echo "::set-output name=release_filename::$release_filename"
echo "::set-output name=release_version::$release_version"
echo "::set-output name=release_var::$release_var"
tachidesk_docker_git_commit=$(git rev-list --count HEAD)
echo "::set-output name=tachidesk_docker_git_commit::$tachidesk_docker_git_commit"
build_date=$(date "+%F")
echo "::set-output name=build_date::$build_date"
echo "::set-output name=repository_owner_lower::$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')"
- name: Build and save preview alpine
id: docker_build_release_alpine
uses: docker/build-push-action@v2
with:
file: scripts/dockerfiles/Git_Actions-Dockerfile
platforms: ${{ env.build_base_image_alpine_platform_testing }}
build-args: |
BASE_IMAGE=${{ env.build_base_image_alpine }}
BUILD_DATE=${{ steps.get_latest_release_metadata.outputs.build_date }}
IMAGE_VERSION=${{ steps.get_latest_release_metadata.outputs.release_version }}
IMAGE_TYPE=preview-alpine
TACHIDESK_GIT_COMMIT=${{ steps.get_latest_release_metadata.outputs.release_commit }}
TACHIDESK_RELEASE_TAG=${{ steps.get_latest_release_metadata.outputs.release_tag }}
TACHIDESK_RELEASE_DOWNLOAD_URL=${{ steps.get_latest_release_metadata.outputs.release_url }}
TACHIDESK_FILENAME=${{ steps.get_latest_release_metadata.outputs.release_filename }}
STARTUP_SCRIPT_URL=${{ env.startup_script_url }}
TACHIDESK_DOCKER_GIT_COMMIT=${{ steps.get_latest_release_metadata.outputs.tachidesk_docker_git_commit }}
tags: |
test-image:preview
outputs: type=docker,dest=/tmp/test_image_preview.tar
- name: Docker Run Test Preview Image
id: docker_run_test_image_preview
run: |
docker load --input /tmp/test_image_preview.tar
mkdir -p /home/runner/work/_temp/tachidesk
chmod -R 777 /home/runner/work/_temp/tachidesk
docker run --rm -d -p 127.0.0.1:4569:4567 -v /home/runner/work/_temp/tachidesk:/home/suwayomi/.local/share/Tachidesk --name=test_image_preview test-image:preview
sleep 15
cat /home/runner/work/_temp/tachidesk/logfile.log
curl -s 127.0.0.1:4569/api/v1/settings/about/ && val=$(curl -s 127.0.0.1:4569/api/v1/settings/about/ | grep -o "Tachidesk" | sort --unique)
if [[ $val == "Tachidesk" ]]; then
echo ""
echo "Tachidesk preview run successfully"
echo "::set-output name=value::true"
docker stop test_image_preview
run_check="true"
else
echo ""
echo "Tachidesk preview run Failed"
echo "::set-output name=value::false"
if [[ ${{ needs.check_workflow.outputs.enable_discord_hook }} == 'true' ]]; then
curl \
-F 'payload_json={"username": "Github", "content": "Docker Preview Image Dry Run Failed Version - ${{ steps.get_latest_release_metadata.outputs.release_tag }}"}' \
-F "file1=@/home/runner/work/_temp/tachidesk/logfile.log" \
"https://discord.com/api/webhooks/${{ secrets.DISCORD_TACHIDESK_WEBHOOK_ID }}/${{ secrets.DISCORD_TACHIDESK_TOKEN }}"
fi
exit 1
fi
docker system prune -a -f --volumes
- name: Delete docker files
run: |
rm -f /tmp/test_image_preview.tar
#rm -rf /home/runner/work/_temp/tachidesk
build_preview:
needs: check_preview
runs-on: ubuntu-latest
if: needs.check_preview.outputs.run_build_preview == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
path: main
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push preview alpine
id: docker_build_release_alpine
uses: docker/build-push-action@v2
with:
file: scripts/dockerfiles/Git_Actions-Dockerfile
platforms: ${{ env.build_base_image_alpine_platform }}
push: ${{ needs.check_preview.outputs.enable_build_publish == 'true' }}
build-args: |
BASE_IMAGE=${{ env.build_base_image_alpine }}
BUILD_DATE=${{ needs.check_preview.outputs.build_date }}
IMAGE_VERSION=${{ needs.check_preview.outputs.release_version }}
IMAGE_TYPE=preview-alpine
TACHIDESK_GIT_COMMIT=${{ needs.check_preview.outputs.release_commit }}
TACHIDESK_RELEASE_TAG=${{ needs.check_preview.outputs.release_tag }}
TACHIDESK_RELEASE_DOWNLOAD_URL=${{ needs.check_preview.outputs.release_url }}
TACHIDESK_FILENAME=${{ needs.check_preview.outputs.release_filename }}
STARTUP_SCRIPT_URL=${{ env.startup_script_url }}
TACHIDESK_DOCKER_GIT_COMMIT=${{ needs.check_preview.outputs.tachidesk_docker_git_commit }}
IMAGE_OWNER=${{ needs.check_preview.outputs.repository_owner_lower }}
tags: |
ghcr.io/${{ needs.check_preview.outputs.repository_owner_lower }}/${{ env.build_repo_docker }}:preview
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: save preview release
run: |
cd main
git pull
echo "`jq '.preview="${{ needs.check_preview.outputs.release_tag }}"' scripts/tachidesk_version.json`" > scripts/tachidesk_version.json
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git status
if [ -n "$(git status --porcelain)" ]; then
git pull
git add .
git commit -m "Update current preview version"
git push
else
echo "No changes to commit"
fi
- name: discord webhook preview
if: ${{ needs.check_preview.outputs.enable_discord_hook == 'true' }}
id: discord_webhook_preview
run: |
curl -H "Content-Type: application/json" -d '{"content": "Docker Preview Image Published!","embeds":[{"color":16729344,"author":{"name":"${{ github.repository_owner }}","icon_url":"https://avatars.githubusercontent.com/u/81182076","url":"https://github.com/${{ github.repository_owner }}"},"title":"Docker Preview Release","url":"https://github.com/${{ github.repository_owner }}/docker-tachidesk","fields":[{"name":"docker update","value":"docker pull ghcr.io/${{ needs.check_preview.outputs.repository_owner_lower }}/tachidesk:preview","inline":false},{"name":"docker run","value":"docker run -p 4567:4567 ghcr.io/${{ needs.check_preview.outputs.repository_owner_lower }}/tachidesk:preview","inline":false}],"thumbnail":{"url": "https://www.docker.com/sites/default/files/d8/2019-07/vertical-logo-monochromatic.png"},"description":"Tachidesk version - ${{ needs.check_preview.outputs.release_tag }}"}]}' "https://discord.com/api/webhooks/${{ secrets.DISCORD_TACHIDESK_WEBHOOK_ID }}/${{ secrets.DISCORD_TACHIDESK_TOKEN }}"

View File

@@ -0,0 +1,37 @@
name: Save Docker Pull Count
on:
workflow_dispatch:
# schedule:
# - cron: "0 11 * * *"
jobs:
save_pull_count:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
path: main
fetch-depth: 0
- name: save total downloads
run: |
cd main
total_downloads_previous=$(jq -r '.total_downloads' scripts/tachidesk_version.json)
total_downloads=$(curl -s https://github.com/Suwayomi/docker-tachidesk/pkgs/container/tachidesk | grep -A1 "Total downloads" | tr -d \\n | egrep -o "Total download.*.=\"[0-9]+\">" | cut -f2 -d"=" | egrep -o "[0-9]+")
if [[ $total_downloads != $total_downloads_previous ]]; then
git pull
echo "`jq --arg value "$total_downloads" '.total_downloads=$value' scripts/tachidesk_version.json`" > scripts/tachidesk_version.json
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git status
if [ -n "$(git status --porcelain)" ]; then
git pull
git add .
git commit -a -m "Update docker pull count"
git push
else
echo "No changes to commit"
fi
fi

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM alpine:latest
RUN apk --update add curl openjdk8-jre-base tzdata
RUN addgroup -g 1000 -S suwayomi && adduser -u 1000 -S suwayomi -G suwayomi
RUN mkdir -p /home/suwayomi && chown -R suwayomi:suwayomi /home/suwayomi
USER suwayomi
WORKDIR /home/suwayomi
RUN curl -s --create-dirs -L https://raw.githubusercontent.com/suwayomi/docker-tachidesk/main/scripts/startup_script.sh -o /home/suwayomi/startup/startup_script.sh
RUN curl -L $(curl -s https://api.github.com/repos/suwayomi/tachidesk/releases/latest | grep -o "https.*jar") -o /home/suwayomi/startup/tachidesk_latest.jar
EXPOSE 4567
CMD ["/bin/sh", "/home/suwayomi/startup/startup_script.sh"]

373
LICENSE Normal file
View File

@@ -0,0 +1,373 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

57
README.md Normal file
View File

@@ -0,0 +1,57 @@
# Tachidesk-docker
| Status | Stable |Preview |
|:-:|:-:|:-:|
| [![Build Docker Images](https://github.com/suwayomi/docker-tachidesk/actions/workflows/build_container_images.yml/badge.svg)](https://github.com/suwayomi/docker-tachidesk/actions/workflows/build_container_images.yml) [![Docker Pulls](https://img.shields.io/badge/dynamic/json?url=https://github.com/suwayomi/docker-tachidesk/raw/main/scripts/tachidesk_version.json&label=docker_pulls&query=$.total_downloads&color=blue)](https://github.com/orgs/suwayomi/packages/container/package/tachidesk) | [![Latest](https://img.shields.io/badge/dynamic/json?url=https://github.com/suwayomi/docker-tachidesk/raw/main/scripts/tachidesk_version.json&label=version&query=$.stable&color=blue)](https://github.com/orgs/suwayomi/packages/container/package/tachidesk/) | [![Preview](https://img.shields.io/badge/dynamic/json?url=https://github.com/suwayomi/docker-tachidesk/raw/main/scripts/tachidesk_version.json&label=version&query=$.preview&color=blue)](https://github.com/orgs/suwayomi/packages/container/package/tachidesk) |
Run [Tachidesk](https://github.com/Suwayomi/Tachidesk) server inside docker container as non-root user. The server will be running on http://localhost:4567 open this url in your browser.
Docker Releases - https://github.com/suwayomi/docker-tachidesk/pkgs/container/tachidesk
Dockerfile - https://github.com/suwayomi/docker-tachidesk
_**Tachidesk data location - /home/suwayomi/.local/share/Tachidesk**_
Docker images are mutli-arch (linux/386, linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/ppc64le, linux/s390x) and has very small size based on alpine linux.
Log file location - /home/suwayomi/.local/share/Tachidesk/logfile.log
# docker Commands
Expose to localhost ip
docker run -p 127.0.0.1:4567:4567 ghcr.io/suwayomi/tachidesk
Expose to specific ip
docker run -p 192.168.x.x:4567:4567 ghcr.io/suwayomi/tachidesk
Expose to all ips
docker run -p 4567:4567 ghcr.io/suwayomi/tachidesk
Change the default UTC timezone. Use TZ database name from [Timezone list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
docker run -e "TZ=Europe/London" -p 127.0.0.1:4567:4567 ghcr.io/suwayomi/tachidesk
For Tachidesk Preview version
docker run -p 127.0.0.1:4567:4567 ghcr.io/suwayomi/tachidesk:preview
Persistent data of tachidesk on subsequent run
docker run -p 127.0.0.1:4567:4567 -v <folder path>:/./home/suwayomi/.local/share/Tachidesk ghcr.io/suwayomi/tachidesk
For Specific Tachidesk stable version (from v0.3.9 onwards)
docker run -p 127.0.0.1:4567:4567 ghcr.io/suwayomi/tachidesk:v0.3.9
# Credit
[Tachidesk](https://github.com/Suwayomi/Tachidesk) is licensed under `MPL v. 2.0`.
# License
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.

15
compose.yml Normal file
View File

@@ -0,0 +1,15 @@
---
version: "2.1"
services:
tachidesk:
image: ghcr.io/suwayomi/tachidesk
container_name: tachidesk
environment:
- PUID=1000
- PGID=1000
- TZ=< change it to your timezone > # Use TZ database name from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
volumes:
- </path/to/folder>/tachidesk:/home/suwayomi/.local/share/Tachidesk
ports:
- 4567:4567
restart: unless-stopped

View File

@@ -0,0 +1,45 @@
ARG BASE_IMAGE=none
FROM $BASE_IMAGE
ARG BASE_IMAGE
ARG BUILD_DATE
ARG IMAGE_VERSION
ARG IMAGE_TYPE
ARG TACHIDESK_GIT_COMMIT
ARG TACHIDESK_RELEASE_TAG
ARG TACHIDESK_FILENAME
ARG TACHIDESK_RELEASE_DOWNLOAD_URL
ARG TACHIDESK_DOCKER_GIT_COMMIT
ARG STARTUP_SCRIPT_URL
RUN if echo "$BASE_IMAGE" | grep -q "alpine"; then apk --update add curl openjdk8-jre-base tzdata && addgroup -g 1000 -S suwayomi && adduser -u 1000 -S suwayomi -G suwayomi; \
elif echo "$BASE_IMAGE" | grep -q "openjdk"; then useradd -ms /bin/sh suwayomi; else echo "wrong base image"; fi
LABEL maintainer="suwayomi" \
org.opencontainers.image.title="Tachidesk Docker" \
org.opencontainers.image.authors="https://github.com/suwayomi" \
org.opencontainers.image.url="https://github.com/suwayomi/docker-tachidesk/pkgs/container/tachidesk" \
org.opencontainers.image.source="https://github.com/suwayomi/docker-tachidesk" \
org.opencontainers.image.description="This image is used to start tachidesk jar executable in a container" \
base_image=$BASE_IMAGE \
org.opencontainers.image.vendor="suwayomi" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$IMAGE_VERSION \
image_type=$IMAGE_TYPE \
"tachidesk.git_commit"=$TACHIDESK_GIT_COMMIT \
"tachidesk.release_tag"=$TACHIDESK_RELEASE_TAG \
"tachidesk.filename"=$TACHIDESK_FILENAME \
download_url=$TACHIDESK_RELEASE_DOWNLOAD_URL \
org.opencontainers.image.licenses="MPL-2.0"
RUN mkdir -p /home/suwayomi && chown -R suwayomi:suwayomi /home/suwayomi
USER suwayomi
WORKDIR /home/suwayomi
RUN echo $TACHIDESK_FILENAME
RUN curl -s --create-dirs -L $TACHIDESK_RELEASE_DOWNLOAD_URL -o /home/suwayomi/startup/tachidesk_latest.jar
RUN echo $TACHIDESK_DOCKER_GIT_COMMIT
RUN curl -s --create-dirs -L $STARTUP_SCRIPT_URL -o /home/suwayomi/startup/startup_script.sh
EXPOSE 4567
CMD ["/bin/sh", "/home/suwayomi/startup/startup_script.sh"]

18
scripts/startup_script.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
if [ ! -f /home/suwayomi/.local/share/Tachidesk/docker_touchfile ]; then
touch /home/suwayomi/.local/share/Tachidesk/docker_touchfile
curl -s --create-dirs -L https://raw.githubusercontent.com/Suwayomi/docker-tachidesk/main/server.conf -o /home/suwayomi/.local/share/Tachidesk/server.conf;
fi
echo ""
echo ""
echo " ************README***********"
echo "-> It is essential that u read readme for ghcr.io/suwayomi/tachidesk before running this container"
echo "-> Readme for ghcr.io/suwayomi/tachidesk is available at https://github.com/suwayomi/docker-tachidesk "
echo " *****************************"
echo ""
echo ""
echo "Tachidesk data location inside the container -> /home/suwayomi/.local/share/Tachidesk"
echo ""
echo "The server is running by default configuration on http://localhost:4567"
echo "log file location inside the container -> /home/suwayomi/.local/share/Tachidesk/logfile.log"
exec java -jar "/home/suwayomi/startup/tachidesk_latest.jar" > /home/suwayomi/.local/share/Tachidesk/logfile.log 2>&1;

View File

@@ -0,0 +1,5 @@
{
"stable": "v0.4.9",
"preview": "v0.4.9-r891",
"total_downloads": "10k+"
}

18
server.conf Normal file
View File

@@ -0,0 +1,18 @@
# Server ip and port bindings
server.ip = "0.0.0.0"
server.port = 4567
# Socks5 proxy
server.socksProxy = false
server.socksProxyHost = ""
server.socksProxyPort = ""
# misc
server.debugLogsEnabled = true
server.systemTrayEnabled = false
# webUI
server.webUIEnabled = true
server.initialOpenInBrowserEnabled = false
server.webUIInterface = "browser"
server.electronPath = ""