Skip to content

Commit

Permalink
Fix deploy-on-fly
Browse files Browse the repository at this point in the history
Changes Dockerfile to use bookworm not latest for rust builder.

Updates docs to not checkout v0.1.0

Fixes ##171
  • Loading branch information
pnasrat authored and spacekookie committed Mar 18, 2024
1 parent 0c82b7f commit 4409f96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions doc/deploy-on-fly/launch.md
Expand Up @@ -26,18 +26,15 @@ Clone the Corrosion repository, and enter its root directory.
$ git clone https://github.com/superfly/corrosion.git && cd corrosion
```

Check out the latest release as a new branch.

```bash
$ git checkout tags/v0.1.0 -b v010
```

[Fly Launch](https://fly.io/docs/apps/launch/) uses a TOML file for [app configuration](https://fly.io/docs/reference/configuration/). Copy the example `fly.toml` to the working directory.

```bash
$ cp examples/fly/fly.toml .
```

Edit `fly.toml` changing the `app` value from `corrosion2` to a unique app name.


## Launch a new app

Launch a new app on Fly.io, using the example Dockerfile.
Expand Down Expand Up @@ -174,7 +171,7 @@ SQLite3 and [not-perf](https://github.com/koute/not-perf) are installed for conv

```Docker
# build image
FROM rust:latest as builder
FROM rust:bookworm as builder
RUN apt update && apt install -y build-essential gcc-x86-64-linux-gnu clang llvm
Expand All @@ -195,7 +192,7 @@ RUN set -eux; \
WORKDIR /usr/src/app
COPY . .
# Will build and cache the binary and dependent crates in release mode
RUN --mount=type=cache,target=/usr/local/cargo,from=rust:latest,source=/usr/local/cargo \
RUN --mount=type=cache,target=/usr/local/cargo,from=rust:bookworm,source=/usr/local/cargo \
--mount=type=cache,target=target \
cargo build --release && mv target/release/corrosion ./
Expand Down
6 changes: 3 additions & 3 deletions examples/fly/Dockerfile
@@ -1,5 +1,5 @@
# build image
FROM rust:latest as builder
FROM rust:bookworm as builder

RUN apt update && apt install -y build-essential gcc-x86-64-linux-gnu clang llvm

Expand All @@ -20,7 +20,7 @@ RUN set -eux; \
WORKDIR /usr/src/app
COPY . .
# Will build and cache the binary and dependent crates in release mode
RUN --mount=type=cache,target=/usr/local/cargo,from=rust:latest,source=/usr/local/cargo \
RUN --mount=type=cache,target=/usr/local/cargo,from=rust:bookworm,source=/usr/local/cargo \
--mount=type=cache,target=target \
cargo build --release && mv target/release/corrosion ./

Expand All @@ -43,4 +43,4 @@ COPY examples/fly/templates /etc/corrosion/templates

ENTRYPOINT ["/entrypoint.sh"]
# Run the app
CMD ["corrosion", "agent"]
CMD ["corrosion", "agent"]

0 comments on commit 4409f96

Please sign in to comment.