-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from HitomaruKonpaku/master
Update README & docker
- Loading branch information
Showing
4 changed files
with
105 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: docker-build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
# pull_request: | ||
# branches: | ||
# - master | ||
|
||
jobs: | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository }} | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=sha | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile | ||
platforms: linux/amd64, linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# KanColle Cache Proxy | ||
|
||
[](https://ko-fi.com/A0A81MOVN) | ||
|
||
This is a local proxy meant to cache KC assets and bypass the gadget IP block. It can be preloaded from a cache dump (linked below). This will improve loading of assets on top of browser built-in cache. | ||
|
||
## Installation and setup | ||
|
||
See [Installation and setup](https://github.com/Tibowl/KCCacheProxy/wiki/Installation-and-setup) for more information. If you still have problems, try in Chrome with the extension linked there and if you still have, you can ask for help in the [reddit KC discord](https://discord.gg/RtSadWM). | ||
|
||
## Docker | ||
|
||
### Proxy server | ||
|
||
Download [docker-compose.yaml](./docker-compose.yaml) or copy below code | ||
|
||
```yaml | ||
--- | ||
services: | ||
kccp: | ||
container_name: kccp | ||
image: ghcr.io/hitomarukonpaku/kccacheproxy | ||
restart: unless-stopped | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./data:/data | ||
- ./cache:/cache | ||
``` | ||
Open terminal in the same folder with above file then run | ||
```sh | ||
docker compose up -d | ||
``` | ||
|
||
### Preload | ||
|
||
```sh | ||
docker run --rm -v "./cache:/cache" ghcr.io/hitomarukonpaku/kccacheproxy preload | ||
``` | ||
|
||
### Update image | ||
|
||
```sh | ||
docker pull ghcr.io/hitomarukonpaku/kccacheproxy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters