From 5b57ca84126bbcb64a45535cf0497bfbfa96d8c2 Mon Sep 17 00:00:00 2001 From: prettysunflower Date: Tue, 29 Jul 2025 23:08:27 -0400 Subject: [PATCH] Added static Docker image --- .gitea/workflows/static_docker_build.yaml | 45 +++++++++++++++++++++++ static/Caddyfile | 4 ++ static/Dockerfile | 4 ++ 3 files changed, 53 insertions(+) create mode 100644 .gitea/workflows/static_docker_build.yaml create mode 100644 static/Caddyfile create mode 100644 static/Dockerfile diff --git a/.gitea/workflows/static_docker_build.yaml b/.gitea/workflows/static_docker_build.yaml new file mode 100644 index 0000000..3ec4ae4 --- /dev/null +++ b/.gitea/workflows/static_docker_build.yaml @@ -0,0 +1,45 @@ +name: Build Docker images for static folder + +on: + workflow_dispatch: + push: + branches: [ "main" ] + tags: [ "*" ] + +defaults: + run: + working-directory: static + +jobs: + acls: + runs-on: ubuntu-latest + + steps: + - + name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: git.prettysunflower.moe/prettysunflower/kakigoori-static + - + name: Login to Gitea Container Hub + uses: docker/login-action@v3 + with: + registry: git.prettysunflower.moe + username: ${{ vars.HUB_USERNAME }} + password: ${{ secrets.HUB_TOKEN }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Build and push + uses: docker/build-push-action@v6 + with: + context: "{{defaultContext}}:static" + push: ${{ gitea.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 diff --git a/static/Caddyfile b/static/Caddyfile new file mode 100644 index 0000000..bfc1958 --- /dev/null +++ b/static/Caddyfile @@ -0,0 +1,4 @@ +:8002 { + root * /srv/ + file_server +} \ No newline at end of file diff --git a/static/Dockerfile b/static/Dockerfile new file mode 100644 index 0000000..18bb052 --- /dev/null +++ b/static/Dockerfile @@ -0,0 +1,4 @@ +FROM caddy:latest + +COPY Caddyfile /etc/caddy/Caddyfile +COPY . /srv/ \ No newline at end of file