fixing several bugs

This commit is contained in:
DioCrafts
2025-03-31 06:20:15 +02:00
parent b81e2a7029
commit 2e1cb4a034
8 changed files with 676 additions and 157 deletions
+5 -4
View File
@@ -2,7 +2,7 @@
FROM rust:1.82-alpine AS builder
# Install build dependencies
RUN apk add --no-cache musl-dev pkgconfig openssl-dev
RUN apk add --no-cache musl-dev pkgconfig openssl-dev postgresql-dev
# Create a non-root user with UID 10001 (we use the same UID across stages)
RUN adduser -D -u 10001 oxicloud
@@ -21,6 +21,7 @@ RUN mkdir -p src && \
# Copy the actual source code and additional files
COPY src ./src
COPY static ./static
COPY db ./db
# Build the actual application and strip debug symbols for a smaller binary
@@ -39,13 +40,13 @@ RUN adduser -D -u 10001 oxicloud
# Create application directories, assign proper permissions
WORKDIR /app
RUN mkdir -p /app/static /app/storage && \
RUN mkdir -p /app/static /app/storage /app/db && \
chown -R oxicloud:oxicloud /app
# Copy the built binary from the builder stage and additional runtime files
COPY --from=builder /app/target/release/oxicloud /app/oxicloud
COPY static ./static
COPY db ./db
COPY --from=builder /app/static /app/static
COPY --from=builder /app/db /app/db
# Ensure all files are owned by the non-root user
RUN chown -R oxicloud:oxicloud /app