-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use linuxserver base image for docker
- Loading branch information
Showing
25 changed files
with
302 additions
and
128 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
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
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,51 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: release-please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Release | ||
uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
command: manifest | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Set up Docker Build | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Login to Github Packages | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Login to Docker hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKERHUB_USERNAME }}/kaizoku:latest | ||
${{ secrets.DOCKERHUB_USERNAME }}/kaizoku:v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} | ||
ghcr.io/${{ github.repository }}:latest | ||
ghcr.io/${{ github.repository }}:v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} | ||
if: ${{ steps.release.outputs.release_created }} |
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,3 @@ | ||
{ | ||
".": "0.0.0" | ||
} |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Alperen Elhan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -1,34 +1,91 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# <img width="32px" src="./public/kaizoku.png" alt="Kaizoku"></img> Kaizoku | ||
|
||
## Getting Started | ||
Kaizoku is self-hosted manga downloader. | ||
|
||
First, run the development server: | ||
![Home Page](https://i.imgur.com/KT9LrtX.png) | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
``` | ||
| Detail Page | Search | | ||
| :---------------------------------------------: | :----------------------------------------: | | ||
| ![Detail Page](https://i.imgur.com/uWgZ9KA.png) | ![Search](https://i.imgur.com/XP4coVD.png) | | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
## Deployment | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
You can deploy Kaizoku with following docker-compose file | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
```yaml | ||
version: '3' | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
volumes: | ||
db: | ||
redis: | ||
|
||
services: | ||
app: | ||
container_name: kaizoku | ||
image: <tbd> | ||
environment: | ||
- DATABASE_URL=postgresql://kaizoku:kaizoku@db:5432/kaizoku | ||
- KAIZOKU_PORT=3000 | ||
- REDIS_HOST=redis | ||
- REDIS_HOST=6379 | ||
- TELEGRAM_TOKEN=<token> # Don't set if you don't want telegram notifications. | ||
- TELEGRAM_CHAT_ID=<chat_id> | ||
- TELEGRAM_SEND_SILENTLY=0 | ||
- PUID=<host user puid> | ||
- PGID=<host user guid> | ||
- TZ=Europe/Istanbul | ||
volumes: | ||
- <path_to_library>:/data | ||
- <path_to_config>:/config | ||
- <path_to_logs>:/logs | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
ports: | ||
- '3000:3000' | ||
redis: | ||
image: redis:7-alpine | ||
volumes: | ||
- redis:/data | ||
db: | ||
image: postgres:alpine | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ['CMD-SHELL', 'pg_isready -U kaizoku'] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
environment: | ||
- POSTGRES_USER=kaizoku | ||
- POSTGRES_DB=kaizoku | ||
- POSTGRES_PASSWORD=kaizoku | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
``` | ||
## Learn More | ||
## Development | ||
To learn more about Next.js, take a look at the following resources: | ||
### Requirements | ||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
- node 18 | ||
- yarn | ||
- docker | ||
- [mangal](https://github.com/metafates/mangal) | ||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
### Start the Kaizoku | ||
```bash | ||
git clone https://github.com/oae/kaizoku.git | ||
cd ./kaizoku/ | ||
cp .env.example .env | ||
yarn install | ||
docker compose up -d redis db | ||
yarn run prisma migrate deploy | ||
yarn dev:server | ||
``` | ||
|
||
## Deploy on Vercel | ||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the page. | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
## Credits | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
Kaizoku uses amazing [mangal](https://github.com/metafates/mangal) by [@metafates](https://github.com/metafates) as it's downloader. |
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
Oops, something went wrong.