mirror of
https://github.com/StarFleetCPTN/GoMFT.git
synced 2026-11-19 19:03:29 +01:00
Add gomftctl CLI tool and encryption key rotation utilities
This commit is contained in:
1 parent
495b844c00
commit
b9acf47530
17 files changed
+1754
-125
No files matched your search
+9
-3
@@ -69,11 +69,16 @@ COPY . .
|
||||
# Generate template files from .templ files
|
||||
RUN templ generate
|
||||
|
||||
# Compile the application with version information
|
||||
# Compile the main application with version information
|
||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
|
||||
-ldflags "-X github.com/starfleetcptn/gomft/components.AppVersion=${VERSION} -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.Commit=${COMMIT} -X github.com/starfleetcptn/gomft/components.BuildTime=${BUILD_TIME} -X github.com/starfleetcptn/gomft/components.Commit=${COMMIT}" \
|
||||
-o /app/gomft
|
||||
|
||||
# Compile the command line tool with version information
|
||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
|
||||
-ldflags "-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.Commit=${COMMIT}" \
|
||||
-o /app/gomftctl ./cmd/gomftctl
|
||||
|
||||
# Install rclone with appropriate architecture
|
||||
RUN apk add --no-cache curl unzip && \
|
||||
if [ "$TARGETARCH" = "arm64" ]; then \
|
||||
@@ -112,8 +117,9 @@ RUN apk add --no-cache ca-certificates tzdata sqlite bash shadow su-exec \
|
||||
RUN addgroup -g ${GID} ${USERNAME} && \
|
||||
adduser -D -u ${UID} -G ${USERNAME} -s /bin/sh ${USERNAME}
|
||||
|
||||
# Copy the binary from the builder stage
|
||||
# Copy the binaries from the builder stage
|
||||
COPY --from=builder /app/gomft /app/
|
||||
COPY --from=builder /app/gomftctl /app/
|
||||
COPY --from=builder /usr/local/bin/rclone /usr/local/bin/rclone
|
||||
|
||||
# Copy components
|
||||
@@ -130,7 +136,7 @@ RUN mkdir -p /app/data /app/backups
|
||||
RUN touch /app/.env && chmod 644 /app/.env && chown ${USERNAME}:${USERNAME} /app/.env
|
||||
|
||||
# Set executable permissions
|
||||
RUN chmod +x /app/gomft
|
||||
RUN chmod +x /app/gomft /app/gomftctl
|
||||
|
||||
# Set ownership of application files
|
||||
RUN chown -R ${USERNAME}:${USERNAME} /app
|
||||
|
||||
Reference in new issue
Block a user