From 65328253700dbb48988aa58350b112b748debce1 Mon Sep 17 00:00:00 2001 From: Christopher Biscardi Date: Fri, 30 Aug 2024 22:50:32 -0700 Subject: [PATCH] cant forget dockerfile --- .github/workflows/release.yml | 4 ++-- Dockerfile | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65512f5..f2dcc41 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: tar -czvf static-assets.tar.gz target/site - name: Publish GitHub Release id: gh-release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: name: gh-${{ env.date }}-${{ github.sha }} fail_on_unmatched_files: true @@ -62,7 +62,7 @@ jobs: token: ${{ secrets.RELEASE_TOKEN }} files: | Cargo.toml - target/release/this-week-in-bevy + target/release/www static-assets.tar.gz target/release/hash.txt fly.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..427507d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:22.04 +RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* +COPY target/release/www /usr/local/bin/www +COPY target/release/hash.txt /usr/local/bin/hash.txt +COPY target/site /opt/ +# COPY Cargo.toml /opt/Cargo.toml +WORKDIR /opt +ENV RUST_LOG=info +ENV LEPTOS_OUTPUT_NAME="www" +ENV LEPTOS_SITE_ROOT="site" +ENV LEPTOS_SITE_PKG_DIR="pkg" +ENV LEPTOS_SITE_ADDR="[::]:3000" +ENV LEPTOS_HASH_FILES=true +CMD ["www"] \ No newline at end of file