Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deploy-on-fly #172

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions doc/deploy-on-fly/launch.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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"]
Loading