From 8b78454e86b2e59bb2c8efec910e9df1fe3417b4 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sun, 9 Mar 2025 19:04:23 +0100 Subject: [PATCH 1/2] Remove unused IFS from test workflow This has been present since moving from Travis CI to GitHub Actions. IFS controls how bash splits words, but we don't do any fancy word-splitting after that, so it's unused. --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 155d6ee0..483c7518 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,6 @@ jobs: - name: Test run: | set -euo pipefail - IFS=$'\n\t' # Check if the code is good cargo build --all --locked cargo clippy -- --deny warnings From b6e33db7a692f4874308d5aaecbb3ff807ce6398 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Sun, 9 Mar 2025 19:09:40 +0100 Subject: [PATCH 2/2] Remove unused docker setup --- .dockerignore | 2 -- .github/workflows/main.yml | 3 -- Dockerfile | 56 -------------------------------------- 3 files changed, 61 deletions(-) delete mode 100644 .dockerignore delete mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index c7f83c2c..00000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -target -.git diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 483c7518..eb61fe8a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,3 @@ jobs: cargo build --all --locked cargo clippy -- --deny warnings cargo test --all --locked - - - name: Build the Docker image - run: docker build -t website . diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c606329f..00000000 --- a/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -################# -# Build image # -################# - -FROM ubuntu:focal AS build - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - ca-certificates \ - curl \ - build-essential \ - pkg-config \ - libsass-dev \ - libssl-dev - -# Install the Rust toolchain with rustup -ENV RUSTUP_VERSION="1.24.3" -ENV RUSTUP_TRIPLE="x86_64-unknown-linux-gnu" -ENV RUSTUP_SHA="3dc5ef50861ee18657f9db2eeb7392f9c2a6c95c90ab41e45ab4ca71476b4338" -RUN curl "https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUSTUP_TRIPLE}/rustup-init" >/tmp/rustup-init && \ - echo "${RUSTUP_SHA} /tmp/rustup-init" | sha256sum --check && \ - chmod +x /tmp/rustup-init && \ - /tmp/rustup-init -y --no-modify-path -ENV PATH=/root/.cargo/bin:$PATH - -WORKDIR /build -COPY src /build/src/ -COPY locales /build/locales/ -COPY static /build/static/ -COPY templates /build/templates/ -COPY Cargo.toml Cargo.lock /build/ -RUN cargo build --release - -###################### -# Production image # -###################### - -FROM ubuntu:focal - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ - ca-certificates \ - tini \ - libsass1 - -COPY --from=build /build/target/release/www-rust-lang-org /usr/local/bin/www-rust-lang-org - -WORKDIR /app -COPY templates /app/templates/ -COPY locales /app/locales/ -COPY static /app/static/ -COPY src/styles /app/src/styles/ - -ENV ROCKET_PORT 80 -ENV ROCKET_PROFILE release - -# Use `tini` (a small PID 1) to properly handle signals. -CMD ["tini", "--", "www-rust-lang-org"]