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

creating a deployment generator to shuttle #124

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

kaplanelad
Copy link
Contributor

@kaplanelad kaplanelad commented Dec 11, 2023

Creating a Shuttle Deployment Generator

User Flow:

  1. Run loco new and select the HTML template for easy testing.

  2. Go to the app direactory and execute cargo loco generate deployment. You will be prompted with the following options:

    ? ❯ Choose your deployment ›
    ❯ Docker
      Shuttle
  3. The Shuttle generator will:

    • Create a Shuttle.toml file with the app's name.
    • Generate a new binary entrypoint at src/bin/shuttle.rs.
    • Update the loco alias in .cargo/config.toml to support the CLI binary.
    • Add the Shuttle binary entry in Cargo.toml.
    • Inject dependencies shuttle-runtime and shuttle-axum.
  4. Run the Shuttle deployment, and it's ready to go!

Changed also the docs

path = "src/bin/shuttle.rs"
- into: Cargo.toml
after: \[dependencies\]
content: "shuttle-runtime = { version = \"0.35.0\", default-features = false }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe put the version as a static parameter in the rust code?

@@ -0,0 +1,5 @@
to: "Shuttle.toml"
skip_exists: true
message: "Suttle.toml file created successfully"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: shuttle

@jondot jondot merged commit 2e4a608 into master Dec 12, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants