Skip to content

Commit

Permalink
Try to auto build caddy container and add zerossl
Browse files Browse the repository at this point in the history
  • Loading branch information
gsteinLTU committed Jun 26, 2024
1 parent 67b909d commit 8134c20
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-caddy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker Image CI Caddy

on:
push:
branches: [ "master" ]
paths:
- 'update_caddyfile.sh'
- 'Dockerfile-caddy'

jobs:
build-server:
runs-on: ubuntu-latest
steps:
- 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: Docker Login
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Server
uses: docker/build-push-action@v6.1.0
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile-caddy
push: true
tags: gstein17/roboscapesim-rs-caddy:latest

4 changes: 4 additions & 0 deletions Caddyfile.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
cert_issuer zerossl ZEROSSL_API_KEY
}

DASH_IP.roboscapeonlineservers.netsblox.org {
reverse_proxy :15000
}
Expand Down
1 change: 1 addition & 0 deletions update_caddyfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ DASH_IP="`curl -s http://checkip.amazonaws.com | cut -d " " -f 2 | tr . -`"

cp Caddyfile.template Caddyfile
sed -i -e "s/DASH_IP/$DASH_IP/g" Caddyfile
sed -i -e "s/ZEROSSL_API_KEY/$ZEROSSL_API_KEY/g" Caddyfile

0 comments on commit 8134c20

Please sign in to comment.