Skip to content

document run-long mode in main readme - #469

Open
xardalph wants to merge 1 commit into
Canop:mainfrom
xardalph:main
Open

xardalph wants to merge 1 commit into
Canop:mainfrom
xardalph:main

Conversation

@xardalph

Copy link
Copy Markdown

Hello,
First, thanks for this very nice project !

I didn't found without clanker help the run-long default job, so this pr aim to make this job more visible by adding it on the main readme.

From my comprehension, this tool is useful for both developing script that terminate and webserver, but the documentation is not very clear about the second use case.

I'm using this in a little docker file, if you tell me where it should be I can make a second PR to add my Dockerfile as an example.

Dockerfile example
# This Dockerfile have 3 stage, one for dev usage with hot reload, 
# one for building the production binary and one production image with minimal dependancies.
# You should update the port exposed and the name of the binary used for you case.

FROM rust:1.99 AS dev
WORKDIR /app
RUN cargo install bacon

EXPOSE 3001
ENTRYPOINT ["bacon", "run-long", "--headless"]

FROM rust:1.99 AS builder
WORKDIR /app
# This allow to compile a rust binary with static linked libc, required for "scratch" image which don't have libc installed.
RUN rustup target add x86_64-unknown-linux-musl
# this allow to cache rust deps build to avoid downloading them over and over.
RUN mkdir -p  src/bin && echo "fn main() {}" > src/bin/dummy.rs
COPY Cargo.toml .
RUN cargo build --release --target=x86_64-unknown-linux-musl
RUN rm src/bin/dummy.rs

# Here we copy our real code and compile it.
COPY . .
RUN cargo build --release --target=x86_64-unknown-linux-musl

FROM scratch AS prod
WORKDIR /app
# Copy the executable we need in small image, to avoid having all rust deps (2GB) in final image.
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/rust-hot-reload /app/rust-hot-reload
EXPOSE 3001
ENTRYPOINT ["/app/rust-hot-reload"]

I see you also have a long running program part in the documentation website where we might add the information, but I didn't took the time to check how to contribute on this for now.

Hope this help :)

@Canop

Canop commented Oct 11, 2026

Copy link
Copy Markdown
Owner

A problem of the README is that bacon has so many possible uses and it's hard to keep a short README and mention everything.

I'll probably start with merging this but I must think about a different way to introduce the project, something which still serves as introduction, with enough content but not replacing the whole bacon website

@Canop

Canop commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

BTW contributing to the main site is easy. It's just a bunch of markdown files. Look at the README.md in the website dir: https://github.com/Canop/bacon/tree/main/website

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