diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4fdc3b6..a00d78a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: include: - - dockerfile: ./example-1-sidecars/Dockerfile + - dockerfile: ./example-1-sidecars image: ghcr.io/liquid-reply/k8s-spin/spin-static-server - - dockerfile: ./example-2-redis/Dockerfile + - dockerfile: ./example-2-redis image: ghcr.io/liquid-reply/k8s-spin/spin-redis steps: - name: Checkout @@ -53,9 +53,9 @@ jobs: name: Build and push Docker image uses: docker/build-push-action@v5 with: - # context: . + context: ${{ matrix.dockerfile }} push: ${{ github.event_name != 'pull_request' }} - file: ${{ matrix.dockerfile }} + file: ${{ matrix.dockerfile }}/Dockerfile labels: ${{ steps.meta.outputs.labels }} tags: | ${{ matrix.image }}:latest diff --git a/bin/spin_static_fs.wasm b/bin/spin_static_fs.wasm deleted file mode 100644 index 2cd1485..0000000 Binary files a/bin/spin_static_fs.wasm and /dev/null differ diff --git a/example-1-sidecars/Dockerfile b/example-1-sidecars/Dockerfile index 3f0e818..16d50e9 100644 --- a/example-1-sidecars/Dockerfile +++ b/example-1-sidecars/Dockerfile @@ -1,3 +1,3 @@ FROM scratch -COPY ./example-1-sidecars/spin.toml ./spin.toml -COPY ../bin/spin_static_fs.wasm ./spin_static_fs.wasm +COPY ./spin.toml ./spin.toml +COPY ./spin_static_fs.wasm ./spin_static_fs.wasm diff --git a/example-1-sidecars/spin.toml b/example-1-sidecars/spin.toml index 69dcfd7..2f60e99 100644 --- a/example-1-sidecars/spin.toml +++ b/example-1-sidecars/spin.toml @@ -1,13 +1,15 @@ -spin_manifest_version = "1" +spin_manifest_version = 2 + +[application] authors = ["Christoph Voigt "] description = "This Spin application serves static files" name = "static-server" -trigger = { type = "http", base = "/" } version = "0.1.0" -[[component]] +[[trigger.http]] +route = "/..." +component = "static-server" + +[component.static-server] source = "./spin_static_fs.wasm" -id = "static-server" files = [{ source = "data", destination = "/" }] -[component.trigger] -route = "/..." diff --git a/example-1-sidecars/spin_static_fs.wasm b/example-1-sidecars/spin_static_fs.wasm new file mode 100644 index 0000000..1fd2fe1 Binary files /dev/null and b/example-1-sidecars/spin_static_fs.wasm differ diff --git a/example-2-redis/Dockerfile b/example-2-redis/Dockerfile index 14517f3..d8c812a 100644 --- a/example-2-redis/Dockerfile +++ b/example-2-redis/Dockerfile @@ -1,7 +1,7 @@ FROM scratch -COPY ./example-2-redis/spin.toml ./spin.toml +COPY spin.toml spin.toml # Remove this line once done testing -COPY ./example-2-redis/redis/runtime_config.toml ./runtime_config.toml +COPY ./redis/runtime_config.toml ./runtime_config.toml -COPY ../bin/env_explorer.wasm ./env_explorer.wasm +COPY ./env_explorer.wasm ./env_explorer.wasm diff --git a/example-2-redis/env_explorer.wasm b/example-2-redis/env_explorer.wasm new file mode 100755 index 0000000..239e2a2 Binary files /dev/null and b/example-2-redis/env_explorer.wasm differ