nxtgauge-backend-rust/apps/video_editors/Dockerfile
Ashwin Kumar 23c2edd567 feat: improve startup and routing
- Create scripts/init-db.sql for DB schema initialization
- Enhance start-services.sh to auto-initialize DB if needed
- Fix users admin handler: change root route from '/users' to '/' to avoid double prefix
- Remove deprecated handlers (departments/designations/employees) from users service
- Add missing admin route mappings for users and approval/case endpoints in gateway
- Update gateway to correctly handle /api/admin/users, /api/admin/approvals, etc.
- Update .env.example and docs

These changes enable running the stack without Docker and fix admin panel routing.
2026-04-07 22:12:37 +02:00

41 lines
850 B
Docker

# Build stage
FROM rust:1.79-slim AS builder
WORKDIR /usr/src/app
# Install build dependencies
RUN apt-get update && apt-get install -y \
pkg-config \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy manifests
COPY Cargo.toml ./
COPY crates ./crates
COPY apps ./apps
# Build the application (release mode for smaller binary)
RUN cargo build --release --bin video_editors
# Runtime stage
FROM debian:bookworm-slim AS runtime
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libsqlite3-0 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Copy binary from builder
COPY --from=builder /usr/src/app/target/release/video_editors ./video_editors
# Switch to non-root user
USER appuser
# Run the binary
CMD ["./video_editors"]