Skip to content

Commit

Permalink
first push
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxxy-GF committed Jul 14, 2023
1 parent 1cf00ad commit af3b795
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

name: Docker Image CI
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- main
paths:
- /**
jobs:
qemu:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
version: "v0.5.1"
buildkitd-flags: --debug
-
uses: docker/login-action@v2
with:
registry: ghcr.io
username: Luxxy-GF
password: ${{ secrets.REGISTRY_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/luxxy-gf/pterodactyl-qbittorrent
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM debian:bookworm-slim

# Path: Dockerfile

RUN apt-get update && apt upgrade -y && apt-get install -y \
build-essential \
curl \
git \
libssl-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*

RUN useradd -m -d /home/container container

USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh
COPY --chmod=777 ./start.sh /start.sh
COPY --chmod=777 ./qbittorrent /qbittorrent
CMD [ "/bin/bash", "/entrypoint.sh" ]
12 changes: 12 additions & 0 deletions compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
app:
entrypoint:
- sleep
- infinity
image: docker/dev-environments-default:stable-1
init: true
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock

14 changes: 14 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
cd /home/container || exit 1

# Configure colors
CYAN='\033[0;36m'
RESET_COLOR='\033[0m'

# Replace Startup Variables
# shellcheck disable=SC2086
echo -e "${CYAN}STARTUP /home/container: /start.sh ${RESET_COLOR}"
# Run the Server
# shellcheck disable=SC2086

eval '/start.sh'
Binary file added qbittorrent
Binary file not shown.
10 changes: 10 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

#Path: start.sh

echo -e "Starting the server"

# Start the first process

/qbittorrent --webui-port=${SERVER_PORT} --profile=/home/container/.config/qBittorrent/ --configuration=/home/container/.config/qBittorrent/ --save-path /home/container/downloads/

0 comments on commit af3b795

Please sign in to comment.