Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create separate docker images for the server and the worker #55

Merged
merged 13 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .dockerignore

This file was deleted.

16 changes: 13 additions & 3 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REPO_OWNER: ${{ github.repository_owner }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: handbrake-web-server
file: server/Dockerfile

- image: handbrake-web-worker
file: worker/Dockerfile

permissions:
contents: read
Expand All @@ -37,7 +46,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ matrix.image }}
tags: |
type=ref,event=branch
type=ref,event=pr
Expand All @@ -49,6 +58,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.file }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -57,6 +67,6 @@ jobs:
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-name: ${{ env.REGISTRY }}/${{ env.REPO_OWNER}}/${{ matrix.image }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
33 changes: 0 additions & 33 deletions Dockerfile

This file was deleted.

7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,18 @@ HandBrake Web is deployed via docker, and most easily via `docker compose`. The
```yaml
services:
handbrake-server:
image: ghcr.io/thenickoftime/handbrake-web:latest
image: ghcr.io/thenickoftime/handbrake-web-server:latest
container_name: handbrake-web-server
environment:
- HANDBRAKE_MODE=server
ports:
- 9999:9999
volumes:
- /path/to/your/data:/data
- /path/to/your/media:/video #ensure this path is the same across all containers

handbrake-worker:
image: ghcr.io/thenickoftime/handbrake-web:latest
image: ghcr.io/thenickoftime/handbrake-web-worker:latest
container_name: handbrake-web-worker
environment:
- HANDBRAKE_MODE=worker
- WORKER_ID= #give your worker a unique name
- SERVER_URL= #set to the url or ip of your server
- SERVER_PORT= #if using a reverse proxy, this may be different than what is set above
Expand Down
Loading