parent
b471c66209
commit
d0e70a7783
14
Dockerfile
14
Dockerfile
|
@ -45,16 +45,26 @@ RUN cargo build --release
|
||||||
# Final stage
|
# Final stage
|
||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies and CA certificates
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
libssl3 \
|
libssl3 \
|
||||||
libtiff6 \
|
libtiff6 \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV RUST_BACKTRACE=1
|
||||||
|
ENV RUST_LOG=warn
|
||||||
|
|
||||||
# Copy the build artifact from the build stage
|
# Copy the build artifact from the build stage
|
||||||
COPY --from=build /quoter/target/release/quoter .
|
COPY --from=build /quoter/target/release/quoter .
|
||||||
|
|
||||||
|
# Create healthcheck
|
||||||
|
HEALTHCHECK --interval=30s --timeout=3s \
|
||||||
|
CMD curl -f http://localhost:8080/ || exit 1
|
||||||
|
|
||||||
# Set the startup command
|
# Set the startup command
|
||||||
CMD ["./quoter"]
|
CMD ["./quoter"]
|
|
@ -18,11 +18,16 @@ pub static MIME_TYPES: Lazy<HashMap<&'static str, &'static str>> = Lazy::new(||
|
||||||
m.insert("tif", "image/tiff");
|
m.insert("tif", "image/tiff");
|
||||||
m.insert("tiff", "image/tiff");
|
m.insert("tiff", "image/tiff");
|
||||||
// Аудио
|
// Аудио
|
||||||
|
m.insert("3gp", "audio/3gpp");
|
||||||
m.insert("mp3", "audio/mpeg");
|
m.insert("mp3", "audio/mpeg");
|
||||||
m.insert("wav", "audio/x-wav");
|
m.insert("wav", "audio/x-wav");
|
||||||
|
m.insert("aif", "audio/x-aiff");
|
||||||
|
m.insert("aiff", "audio/x-aiff");
|
||||||
|
m.insert("m4a", "audio/m4a");
|
||||||
|
m.insert("m4b", "audio/m4b");
|
||||||
|
m.insert("m4p", "audio/m4p");
|
||||||
m.insert("ogg", "audio/ogg");
|
m.insert("ogg", "audio/ogg");
|
||||||
m.insert("aac", "audio/aac");
|
m.insert("aac", "audio/aac");
|
||||||
m.insert("m4a", "audio/m4a");
|
|
||||||
m.insert("flac", "audio/flac");
|
m.insert("flac", "audio/flac");
|
||||||
m
|
m
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user