diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7d62f93 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +target +.git +.github +.claude diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bcb06cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Stage 1: Build the application +FROM rust:alpine AS builder + +# Install build dependencies +RUN apk add --no-cache musl-dev + +# Create a new empty shell project +WORKDIR /usr/src/roy +COPY . . + +# Build for release +RUN cargo build --release + +# Stage 2: Create the final, lightweight image +FROM alpine:latest + +# Copy the compiled binary from the builder stage +COPY --from=builder /usr/src/roy/target/release/roy /usr/local/bin/roy + +# Expose the port the app runs on +EXPOSE 8000 + +# Set the entrypoint +CMD ["roy", "-vvv"] diff --git a/src/lib.rs b/src/lib.rs index c442cb6..7751bcd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,7 +34,7 @@ pub struct Args { #[arg(long, help = "Port to listen on", default_value = "8000")] pub port: u16, - #[arg(long, help = "Address to listen on", default_value = "127.0.0.1")] + #[arg(long, help = "Address to listen on", default_value = "0.0.0.0")] pub address: IpAddr, #[arg(