Skip to content

Commit e89ce05

Browse files
YaroslavLitvinovnikitastryukgithub-actions[bot]
authored andcommitted
Yaro/slatedb durability config2 (#1773)
* update slatedb to v0.8.2 * use less durable but faster option when put history items * [UI] Static hostname issue fix (Run-time Placeholder solution) (#1770) * CI: Generate build artifacts (dist.tar) [skip ci] --------- Co-authored-by: Nikita Striuk <32720808+nikitastryuk@users.noreply.github.com> Co-authored-by: github-actions[bot] <1310417+github-actions[bot]@users.noreply.github.com>
1 parent d44c220 commit e89ce05

File tree

2 files changed

+19
-188
lines changed

2 files changed

+19
-188
lines changed

Cargo.lock

Lines changed: 5 additions & 182 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,28 @@ RUN apt-get update && apt-get install -y \
1111
ca-certificates \
1212
&& rm -rf /var/lib/apt/lists/*
1313

14-
# Copy source code
14+
# Copy all source code, including the pre-built frontend and entrypoint script
1515
COPY . .
1616

1717
# Build the application with optimizations
1818
RUN cargo build --release --bin embucketd
1919

20-
# Stage 4: Final runtime image
20+
# Stage 2: Final runtime image
2121
FROM gcr.io/distroless/cc-debian12 AS runtime
2222

23-
# Set working directory
24-
USER nonroot:nonroot
2523
WORKDIR /app
2624

27-
# Copy the binary and required files
25+
# Copy the compiled binary, API spec, frontend build, and entrypoint script
2826
COPY --from=builder /app/target/release/embucketd ./embucketd
2927
COPY --from=builder /app/rest-catalog-open-api.yaml ./rest-catalog-open-api.yaml
28+
COPY --from=builder /app/frontend/dist ./dist
29+
COPY --from=builder /app/entrypoint.sh /usr/local/bin/entrypoint.sh
30+
31+
# Make the script executable and ensure the nonroot user can modify app files
32+
RUN chmod +x /usr/local/bin/entrypoint.sh && chown -R nonroot:nonroot /app
33+
34+
# Switch to a non-privileged user
35+
USER nonroot:nonroot
3036

3137
# Expose port (adjust as needed)
3238
EXPOSE 8080
@@ -37,5 +43,7 @@ ENV FILE_STORAGE_PATH=data/
3743
ENV BUCKET_HOST=0.0.0.0
3844
ENV JWT_SECRET=63f4945d921d599f27ae4fdf5bada3f1
3945

40-
# Default command
46+
# Set the entrypoint to our script
47+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
48+
4149
CMD ["./embucketd"]

0 commit comments

Comments
 (0)