Skip to content

Commit 557a629

Browse files
committed
correction workflow readme
1 parent d6c1b06 commit 557a629

File tree

3 files changed

+54
-31
lines changed

3 files changed

+54
-31
lines changed

.github/workflows/docker-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
type=semver,pattern={{version}}
2626
type=semver,pattern={{major}}.{{minor}}
2727
type=semver,pattern={{major}}
28-
type=sha
2928
3029
- name: Set up QEMU
3130
uses: docker/setup-qemu-action@master
@@ -45,5 +44,6 @@ jobs:
4544
with:
4645
context: .
4746
push: true
47+
platforms: linux/amd64,linux/arm64
4848
tags: ${{ steps.meta.outputs.tags }}
4949
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM caddy:builder-alpine AS builder
22

3-
LABEL org.opencontainers.image.source="https://github.com/quix-labs/caddy-image-processor"
4-
5-
63
RUN apk add --update --no-cache make vips-dev gcc musl-dev
74

85
ADD . .

README.md

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,65 @@
55
This repository contains a CaddyServer module for processing images on the fly using libvips.
66

77
## Features
8+
89
- Automatic image processing based on URL query parameters
910
- Supports resizing, rotating, cropping, quality adjustments, format conversion, and more
1011
- Efficient processing using libvips
1112

1213
## Prerequisites
14+
1315
- [Caddy](https://caddyserver.com/) installed on your system
1416
- [libvips](https://libvips.github.io/libvips/install.html) installed on your system
1517
- [libvips-dev](https://libvips.github.io/libvips/install.html) installed on your system
1618

17-
## Building with xcaddy
19+
## Installation and Configuration
1820

19-
Before building the module, ensure you have `xcaddy` installed on your system. You can install it using the following command:
21+
### Using Docker
2022

21-
```bash
22-
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
23-
```
23+
- Pull the Docker image from the GitHub Container Registry:
24+
```bash
25+
docker pull ghcr.io/quix-labs/caddy-image-processor:latest
26+
```
2427

25-
To build this module into Caddy, run the following command:
28+
### Using xcaddy
2629

27-
```bash
28-
CGO_ENABLED=1 xcaddy build --with github.com/quix-labs/caddy-image-processor
29-
```
30+
- Before building the module, ensure you have `xcaddy` installed on your system. You can install it using the following
31+
command:
32+
33+
```bash
34+
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
35+
```
36+
37+
- To build this module into Caddy, run the following command:
38+
39+
```bash
40+
CGO_ENABLED=1 xcaddy build --with github.com/quix-labs/caddy-image-processor
41+
```
3042

31-
This command compiles Caddy with the image processing module included.
43+
This command compiles Caddy with the image processing module included.
3244

3345
## Usage
3446

35-
Follow these steps to utilize the image processing capabilities:
3647

37-
1. Install Caddy and libvips on your system.
38-
2. Build Caddy with the image processing module using xcaddy.
39-
3. Configure your Caddyfile to include the image processing module for specific routes or sites.
40-
4. Start Caddy, and access your images with processing options via URL query parameters.
48+
### Using Docker
4149

42-
## Available Query Parameters
50+
```bash
51+
docker run -p 80:80 -v $PWD/Caddyfile:/etc/caddy/Caddyfile -d ghcr.io/quix-labs/caddy-image-processor:latest
52+
```
53+
54+
Your can see more information in the [official docker documentation for caddy](https://hub.docker.com/_/caddy)
55+
56+
### Using xcaddy build
57+
58+
```bash
59+
/path/to/your/caddy run --config /etc/caddy/Caddyfile
60+
```
61+
62+
Your can see more information in the [official documentation for caddy](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debianubunturaspbian)
4363

44-
- or: Orientation (e.g., 90, 180, 270)
45-
- crop: Crop (1 for true, 0 for false)
46-
- w: Width
47-
- h: Height
48-
- blur: Blur amount
49-
- q: Quality
50-
- fm: Format (e.g., jpg, png, gif, webp, avif)
5164

5265
## Example Caddyfile
66+
5367
```plaintext
5468
{
5569
order image_processor before respond
@@ -62,7 +76,19 @@ localhost {
6276
}
6377
```
6478

65-
In this example, requests to `/images*` undergo processing by the image processor module before being served by the reverse proxy.
79+
In this example, all requests undergo processing by the image processor module before being served by the
80+
caddy.
81+
82+
## Available Query Parameters
83+
84+
- or: Orientation (e.g., 90, 180, 270)
85+
- crop: Crop (1 for true, 0 for false)
86+
- w: Width
87+
- h: Height
88+
- blur: Blur amount
89+
- q: Quality
90+
- fm: Format (e.g., jpg, png, gif, webp, avif)
91+
6692

6793
## Planned Features
6894

@@ -71,7 +97,8 @@ The following features are planned for future implementation:
7197
- FLIP parameter
7298
- CROP NOT GLIDE COMPLIANT parameter adjustments
7399
- Additional parameters: fit, dpr, bri, con, gam, sharp
74-
- Parameters for adding watermark: pixel, filt, mark, markw, markh, markx, marky, markpad, markpos, markalpha, bg, border
100+
- Parameters for adding watermark: pixel, filt, mark, markw, markh, markx, marky, markpad, markpos, markalpha, bg,
101+
border
75102

76103
## Development
77104

@@ -82,7 +109,7 @@ To contribute to the development of Caddy Image Processor, follow these steps:
82109
```bash
83110
git clone https://github.com/quix-labs/caddy-image-processor.git
84111
```
85-
112+
86113
3. Navigate to the project directory:
87114
4. Install `xcaddy` if you haven't already:
88115
```bash
@@ -108,7 +135,6 @@ To contribute to the development of Caddy Image Processor, follow these steps:
108135
- [COLANT Alan](https://github.com/alancolant)
109136
- [All Contributors](../../contributors)
110137
111-
112138
## License
113139
114140
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)