Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdksh committed Sep 12, 2024
1 parent f16a064 commit ebd39c6
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: deploy-pipeline

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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@v6
with:
context: .
push: true
tags: ghcr.io/generalmagicio/gm-caddy:latest
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM caddy:2-builder-alpine AS builder

RUN xcaddy build \
--with github.com/mholt/caddy-ratelimit \
--with github.com/porech/caddy-maxmind-geolocation \
--with github.com/muety/caddy-remote-host \
--with github.com/caddy-dns/godaddy

FROM caddy:2-alpine

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# gm-caddy
# Caddy GM
We want a specific Caddy Web Server Image that works with our GM Deployments. We are using this as a migration from nginx. This is a
specific caddy build that supports the below:
1. Rate Limiting
2. GeoBlocking & Control
## Usage
You can find the docker-compose configuration snippet example here:
```
caddy:
image: ghcr.io/generalmagicio/gm-caddy:latest
container_name: caddy
restart: unless-stopped
networks:
- mynetwork
ports:
- 80:80
- 443:443
env_file:
- .env
environment:
MY_URL = ${MY_URL:-}
IP_WHITELIST: ${IP_WHITELIST:-}
volumes:
- caddy_data:/data
- caddy_config:/config
- ./Caddyfile:/etc/caddy/Caddyfile
```

0 comments on commit ebd39c6

Please sign in to comment.